summaryrefslogtreecommitdiff
path: root/libs/FLib/JCalendar/org/freixas/jcalendar/DateEvent.java
diff options
context:
space:
mode:
Diffstat (limited to 'libs/FLib/JCalendar/org/freixas/jcalendar/DateEvent.java')
-rw-r--r--libs/FLib/JCalendar/org/freixas/jcalendar/DateEvent.java86
1 files changed, 86 insertions, 0 deletions
diff --git a/libs/FLib/JCalendar/org/freixas/jcalendar/DateEvent.java b/libs/FLib/JCalendar/org/freixas/jcalendar/DateEvent.java
new file mode 100644
index 0000000..dfd4f9f
--- /dev/null
+++ b/libs/FLib/JCalendar/org/freixas/jcalendar/DateEvent.java
@@ -0,0 +1,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();
+}
+
+}