summaryrefslogtreecommitdiff
path: root/libs/FLib/JCalendar/org/freixas/jcalendar/DateEvent.java
blob: dfd4f9fbc00db796602beb67c6a2c6c0a254a041 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//**********************************************************************
// Package
//**********************************************************************

package org.freixas.jcalendar;

//**********************************************************************
// Import list
//**********************************************************************

import java.util.EventObject;
import java.util.Calendar;

/**
 * This class holds information related to a date change in a
 * calendar.
 *
 * @see JCalendar
 * @see JCalendarCombo
 * @author Antonio Freixas
 */

// Copyright © 2003 Antonio Freixas
// All Rights Reserved.

public class DateEvent
    extends EventObject
{

//**********************************************************************
// Private Members
//**********************************************************************

private Calendar selectedDate;

//**********************************************************************
// Constructors
//**********************************************************************

/**
 * Create a date event.
 *
 * @param source The object on which the event occurred.
 * @param selectedDate The selected date.
 */

public
DateEvent(
    Object source,
    Calendar selectedDate)
{
    super(source);
    this.selectedDate = selectedDate;
}

//**********************************************************************
// Public
//**********************************************************************

/**
 * Return the selected date.
 *
 * @return The selected date.
 */

public Calendar
getSelectedDate()
{
    return selectedDate;
}

//The default equals and hashCode methods are acceptable.

/**
 * {@inheritDoc}
 */

public String
toString()
{
    return
	super.toString() + ",selectedDate=" +
	selectedDate.getTime().toString();
}

}