public class CalendarEvent extends Event
Calendar calendar = new Calendar("Home");
calendar.addEventHandler(CalendarEvent.ENTRY_ADDED, evt -> {...});
Modifier and Type | Field and Description |
---|---|
static EventType<CalendarEvent> |
ANY
The supertype of all event types in this event class.
|
static EventType<CalendarEvent> |
CALENDAR_CHANGED
An event type used to inform the application that "something" inside the
calendar has changed and that the views need to update their visuals
accordingly (brute force update).
|
static EventType<CalendarEvent> |
ENTRY_CALENDAR_CHANGED
An event type used to inform the application that an entry has been moved
from one calendar to another.
|
static EventType<CalendarEvent> |
ENTRY_CHANGED
The supertype of all events that a related to an entry itself and not the
calendar.
|
static EventType<CalendarEvent> |
ENTRY_FULL_DAY_CHANGED
An event type used to inform the application that an entry has become a
"full day" entry, meaning its start and end time are no longer relevant.
|
static EventType<CalendarEvent> |
ENTRY_INTERVAL_CHANGED
An event type used to inform the application that the time bounds of an
entry have been changed.
|
static EventType<CalendarEvent> |
ENTRY_LOCATION_CHANGED
An event type used to inform the application that an entry has been
assigned a new user object.
|
static EventType<CalendarEvent> |
ENTRY_RECURRENCE_RULE_CHANGED
An event type used to inform the application that an entry has been
assigned a new user object.
|
static EventType<CalendarEvent> |
ENTRY_TITLE_CHANGED
An event type used to inform the application that an entry has been
assigned a new title.
|
static EventType<CalendarEvent> |
ENTRY_USER_OBJECT_CHANGED
An event type used to inform the application that an entry has been
assigned a new user object.
|
consumed, eventType, NULL_SOURCE_TARGET, target
source
Modifier | Constructor and Description |
---|---|
protected |
CalendarEvent(EventType<? extends CalendarEvent> eventType,
Calendar calendar)
Constructs a new event for subclass.
|
|
CalendarEvent(EventType<? extends CalendarEvent> eventType,
Calendar calendar,
Entry<?> entry)
Constructs a new event.
|
|
CalendarEvent(EventType<CalendarEvent> eventType,
Calendar calendar,
Entry<?> entry,
boolean oldFullDay)
Constructs a new event used for signaling that an entry was set to full
day.
|
|
CalendarEvent(EventType<CalendarEvent> eventType,
Calendar calendar,
Entry<?> entry,
Calendar oldCalendar)
Constructs a new event used for signalling that an entry was assigned to
a new calendar.
|
|
CalendarEvent(EventType<CalendarEvent> eventType,
Calendar calendar,
Entry<?> entry,
Interval oldInterval)
Constructs a new event used for signalling that an entry was assigned a
new start end date / time.
|
|
CalendarEvent(EventType<CalendarEvent> eventType,
Calendar calendar,
Entry<?> entry,
Object oldUserObject)
Constructs a new event used for signalling that an entry has been
assigned a new user object.
|
|
CalendarEvent(EventType<CalendarEvent> eventType,
Calendar calendar,
Entry<?> entry,
String oldText)
Constructs a new event used for signalling that an entry was assigned a
new text (normally the title).
|
Modifier and Type | Method and Description |
---|---|
Calendar |
getCalendar()
Returns the calendar for which the event was fired.
|
Entry<?> |
getEntry()
Returns the entry for which the event was fired.
|
Calendar |
getOldCalendar()
Returns the old calendar.
|
boolean |
getOldFullDay()
Returns the old value of the "full day" flag.
|
Interval |
getOldInterval()
Returns the old time interval of the modified entry.
|
String |
getOldText()
Returns the old text.
|
Object |
getOldUserObject()
Returns the old user object of the modified entry.
|
boolean |
isDayChange()
Determines whether the event will have an impact on different days.
|
boolean |
isEntryAdded()
A utility method to determine if the event describes the creation of a new
entry.
|
boolean |
isEntryRemoved()
A utility method to determine if the event describes the removal of an
entry.
|
String |
toString() |
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
getSource
public static final EventType<CalendarEvent> ANY
public static final EventType<CalendarEvent> CALENDAR_CHANGED
public static final EventType<CalendarEvent> ENTRY_CHANGED
public static final EventType<CalendarEvent> ENTRY_CALENDAR_CHANGED
public static final EventType<CalendarEvent> ENTRY_FULL_DAY_CHANGED
public static final EventType<CalendarEvent> ENTRY_RECURRENCE_RULE_CHANGED
public static final EventType<CalendarEvent> ENTRY_TITLE_CHANGED
public static final EventType<CalendarEvent> ENTRY_USER_OBJECT_CHANGED
public static final EventType<CalendarEvent> ENTRY_LOCATION_CHANGED
public static final EventType<CalendarEvent> ENTRY_INTERVAL_CHANGED
protected CalendarEvent(EventType<? extends CalendarEvent> eventType, Calendar calendar)
eventType
- the event typecalendar
- the calendar where the event occurred.public CalendarEvent(EventType<? extends CalendarEvent> eventType, Calendar calendar, Entry<?> entry)
eventType
- the event typecalendar
- the calendar where the event occuredentry
- the affected entrypublic CalendarEvent(EventType<CalendarEvent> eventType, Calendar calendar, Entry<?> entry, Calendar oldCalendar)
eventType
- the event typecalendar
- the calendar where the event occuredentry
- the affected entryoldCalendar
- the calendar to which the event belonged beforepublic CalendarEvent(EventType<CalendarEvent> eventType, Calendar calendar, Entry<?> entry, Object oldUserObject)
eventType
- the event typecalendar
- the calendar where the event occuredentry
- the affected entryoldUserObject
- the calendar to which the event belonged beforepublic CalendarEvent(EventType<CalendarEvent> eventType, Calendar calendar, Entry<?> entry, Interval oldInterval)
eventType
- the event typecalendar
- the calendar where the event occuredentry
- the affected entryoldInterval
- the previous time intervalpublic CalendarEvent(EventType<CalendarEvent> eventType, Calendar calendar, Entry<?> entry, String oldText)
eventType
- the event typecalendar
- the calendar where the event occuredentry
- the affected entryoldText
- the previous value of the textpublic CalendarEvent(EventType<CalendarEvent> eventType, Calendar calendar, Entry<?> entry, boolean oldFullDay)
eventType
- the event typecalendar
- the calendar where the event occuredentry
- the affected entryoldFullDay
- the previous value of the full daypublic Entry<?> getEntry()
public final Calendar getCalendar()
public Object getOldUserObject()
public Interval getOldInterval()
public final String getOldText()
public final boolean getOldFullDay()
public final Calendar getOldCalendar()
public final boolean isEntryAdded()
ENTRY_CALENDAR_CHANGED
and
the old calendar was null.public final boolean isEntryRemoved()
ENTRY_CALENDAR_CHANGED
and
the old calendar was not null but the new calendar is null.public final boolean isDayChange()
public String toString()
toString
in class EventObject
Copyright © 2017 Dirk Lemmermann Software & Consulting. All rights reserved.