Package org.zkoss.calendar.event
Class CalendarDataEvent
- java.lang.Object
-
- org.zkoss.calendar.event.CalendarDataEvent
-
- All Implemented Interfaces:
Serializable
public class CalendarDataEvent extends Object implements Serializable
This class represents an event that encapsulates changes to a date range in aCalendarModel. The class allows listeners to react to changes in aCalendarModelby providing details about what changed. It is used with the observer pattern to propagateCalendarModelupdates toCalendarDataListener.- Author:
- jumperchen,jimmy
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intCONTENTS_CHANGEDIdentifies one or more changes in the lists contents.static intINTERVAL_ADDEDIdentifies the addition of one or more contiguous items to the list.static intINTERVAL_REMOVEDIdentifies the removal of one or more contiguous items from the list.
-
Constructor Summary
Constructors Constructor Description CalendarDataEvent(CalendarModel model, int type, Date begin, Date end, TimeZone timezone)Deprecated.As of release 2.0-RC, replaced withCalendarDataEvent(CalendarModel model, int type, CalendarItem e, TimeZone timezone)CalendarDataEvent(CalendarModel model, int type, CalendarItem e, TimeZone timezone)Contructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetBeginDate()Returns the begin date of the change range.CalendarItemgetCalendarItem()DategetEndDate()Returns the end date of the change range.CalendarModelgetModel()Returns the calendar model that fires this event.TimeZonegetTimeZone()Return the time zone of the calendarintgetType()Returns the event type.StringtoString()
-
-
-
Field Detail
-
CONTENTS_CHANGED
public static final int CONTENTS_CHANGED
Identifies one or more changes in the lists contents.- See Also:
- Constant Field Values
-
INTERVAL_ADDED
public static final int INTERVAL_ADDED
Identifies the addition of one or more contiguous items to the list.- See Also:
- Constant Field Values
-
INTERVAL_REMOVED
public static final int INTERVAL_REMOVED
Identifies the removal of one or more contiguous items from the list.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CalendarDataEvent
public CalendarDataEvent(CalendarModel model, int type, Date begin, Date end, TimeZone timezone)
Deprecated.As of release 2.0-RC, replaced withCalendarDataEvent(CalendarModel model, int type, CalendarItem e, TimeZone timezone)Contructor.- Parameters:
type- one ofCONTENTS_CHANGED,INTERVAL_ADDED,INTERVAL_REMOVED.
-
CalendarDataEvent
public CalendarDataEvent(CalendarModel model, int type, CalendarItem e, TimeZone timezone)
Contructor.- Parameters:
type- one ofCONTENTS_CHANGED,INTERVAL_ADDED,INTERVAL_REMOVED.- Since:
- 1.1.1_50
-
-
Method Detail
-
getModel
public CalendarModel getModel()
Returns the calendar model that fires this event.
-
getType
public int getType()
-
getBeginDate
public Date getBeginDate()
Returns the begin date of the change range.
-
getEndDate
public Date getEndDate()
Returns the end date of the change range.
-
getTimeZone
public TimeZone getTimeZone()
Return the time zone of the calendar
-
getCalendarItem
public CalendarItem getCalendarItem()
- Since:
- 1.1.1_50 Return the CalendarItem of the calendar
-
-