Calendar calendar = new Calendar("Home");
calendar.addEventHandler(CalendarEvent.ENTRY_ADDED, evt -> {...});
Calendar#addEventHandler(javafx.event.EventHandler)
| Modifier and Type | Field and Description |
|---|---|
| public static final EventType | ANY
Hides javafx. |
| private final Calendar | |
| public static final EventType | 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). |
| private Entry | |
| public static final EventType | ENTRY_CALENDAR_CHANGED
An event type used to inform the application that an entry has been moved from one calendar to another. |
| public static final EventType | ENTRY_CHANGED
The supertype of all events that a related to an entry itself and not the calendar. |
| public static final EventType | 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. |
| public static final EventType | ENTRY_INTERVAL_CHANGED
An event type used to inform the application that the time bounds of an entry have been changed. |
| public static final EventType | ENTRY_LOCATION_CHANGED
An event type used to inform the application that an entry has been assigned a new user object. |
| public static final EventType | ENTRY_RECURRENCE_RULE_CHANGED
An event type used to inform the application that an entry has been assigned a new user object. |
| public static final EventType | ENTRY_TITLE_CHANGED
An event type used to inform the application that an entry has been assigned a new title. |
| public static final EventType | ENTRY_USER_OBJECT_CHANGED
An event type used to inform the application that an entry has been assigned a new user object. |
| private Calendar | |
| private boolean | |
| private Interval | |
| private String | |
| private Object | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | CalendarEvent(EventType<? extends CalendarEvent>
the event type eventType, Calendar<T> the calendar where the event occurred. calendar)Constructs a new event for subclass. |
| public | CalendarEvent(EventType<? extends CalendarEvent>
the event type eventType, Calendar<T> the calendar where the event occured calendar, Entry<?> the affected entry entry)Constructs a new event. |
| public | CalendarEvent(EventType<CalendarEvent>
the event type eventType, Calendar<T> the calendar where the event occured calendar, Entry<?> the affected entry entry, Calendar<T> the calendar to which the event belonged before oldCalendar)Constructs a new event used for signalling that an entry was assigned to a new calendar. |
| public | CalendarEvent(EventType<CalendarEvent>
the event type eventType, Calendar<T> the calendar where the event occured calendar, Entry<?> the affected entry entry, Object the calendar to which the event belonged before oldUserObject)Constructs a new event used for signalling that an entry has been assigned a new user object. |
| public | CalendarEvent(EventType<CalendarEvent>
the event type eventType, Calendar<T> the calendar where the event occured calendar, Entry<?> the affected entry entry, Interval the previous time interval oldInterval)Constructs a new event used for signalling that an entry was assigned a new start end date / time. |
| public | CalendarEvent(EventType<CalendarEvent>
the event type eventType, Calendar<T> the calendar where the event occured calendar, Entry<?> the affected entry entry, String the previous value of the text oldText)Constructs a new event used for signalling that an entry was assigned a new text (normally the title). |
| public | CalendarEvent(EventType<CalendarEvent>
the event type eventType, Calendar<T> the calendar where the event occured calendar, Entry<?> the affected entry entry, boolean the previous value of the full day oldFullDay)Constructs a new event used for signaling that an entry was set to full day. |
| Modifier and Type | Method and Description |
|---|---|
| public final Calendar | |
| public Entry | |
| public final Calendar | |
| public final boolean | |
| public Interval | |
| public final String | |
| public Object | |
| public final boolean | Returns: true if the new time interval of the entry touches other days than the old time interval of the entryDetermines whether the event will have an impact on different days. |
| public final boolean | Returns: true if the event describes the creation of a new entryA utility method to determine if the event describes the creation of a new entry. |
| public final boolean | Returns: true if the event describes the removal of a new entryA utility method to determine if the event describes the removal of an entry. |
| public String | toString()
Overrides java. Returns a String representation of this EventObject. |
| ANY | back to summary |
|---|---|
| public static final EventType<CalendarEvent> ANY Hides javafx. The supertype of all event types in this event class. | |
| calendar | back to summary |
|---|---|
| private final Calendar<T> calendar | |
| CALENDAR_CHANGED | back to summary |
|---|---|
| public static final 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). | |
| entry | back to summary |
|---|---|
| private Entry<?> entry | |
| ENTRY_CALENDAR_CHANGED | back to summary |
|---|---|
| public static final EventType<CalendarEvent> ENTRY_CALENDAR_CHANGED An event type used to inform the application that an entry has been moved from one calendar to another. | |
| ENTRY_CHANGED | back to summary |
|---|---|
| public static final EventType<CalendarEvent> ENTRY_CHANGED The supertype of all events that a related to an entry itself and not the calendar. | |
| ENTRY_FULL_DAY_CHANGED | back to summary |
|---|---|
| public static final 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. The entry should be visualized in a way that signals that the entry will take all day (e.g. a birthday). | |
| ENTRY_INTERVAL_CHANGED | back to summary |
|---|---|
| public static final EventType<CalendarEvent> ENTRY_INTERVAL_CHANGED An event type used to inform the application that the time bounds of an entry have been changed. One or several of start / end date, start / end time. | |
| ENTRY_LOCATION_CHANGED | back to summary |
|---|---|
| public static final EventType<CalendarEvent> ENTRY_LOCATION_CHANGED An event type used to inform the application that an entry has been assigned a new user object. | |
| ENTRY_RECURRENCE_RULE_CHANGED | back to summary |
|---|---|
| public static final EventType<CalendarEvent> ENTRY_RECURRENCE_RULE_CHANGED An event type used to inform the application that an entry has been assigned a new user object. | |
| ENTRY_TITLE_CHANGED | back to summary |
|---|---|
| public static final EventType<CalendarEvent> ENTRY_TITLE_CHANGED An event type used to inform the application that an entry has been assigned a new title. | |
| ENTRY_USER_OBJECT_CHANGED | back to summary |
|---|---|
| public static final EventType<CalendarEvent> ENTRY_USER_OBJECT_CHANGED An event type used to inform the application that an entry has been assigned a new user object. | |
| oldCalendar | back to summary |
|---|---|
| private Calendar<T> oldCalendar | |
| oldFullDay | back to summary |
|---|---|
| private boolean oldFullDay | |
| oldInterval | back to summary |
|---|---|
| private Interval oldInterval | |
| oldText | back to summary |
|---|---|
| private String oldText | |
| oldUserObject | back to summary |
|---|---|
| private Object oldUserObject | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| CalendarEvent | back to summary |
|---|---|
| protected CalendarEvent(EventType<? extends CalendarEvent> eventType, Calendar<T> calendar) Constructs a new event for subclass.
| |
| CalendarEvent | back to summary |
|---|---|
| public CalendarEvent(EventType<? extends CalendarEvent> eventType, Calendar<T> calendar, Entry<?> entry) Constructs a new event.
| |
| CalendarEvent | back to summary |
|---|---|
| public CalendarEvent(EventType<CalendarEvent> eventType, Calendar<T> calendar, Entry<?> entry, Calendar<T> oldCalendar) Constructs a new event used for signalling that an entry was assigned to a new calendar. The entry already carries a reference to new calendar and the event object will know the old calendar.
| |
| CalendarEvent | back to summary |
|---|---|
| public CalendarEvent(EventType<CalendarEvent> eventType, Calendar<T> calendar, Entry<?> entry, Object oldUserObject) Constructs a new event used for signalling that an entry has been assigned a new user object. The entry already carries a reference to the new user object and the event object will know the old user object.
| |
| CalendarEvent | back to summary |
|---|---|
| public CalendarEvent(EventType<CalendarEvent> eventType, Calendar<T> calendar, Entry<?> entry, Interval oldInterval) Constructs a new event used for signalling that an entry was assigned a new start end date / time. The entry already carries the new values, while the old values can be retrieved from the event object.
| |
| CalendarEvent | back to summary |
|---|---|
| public CalendarEvent(EventType<CalendarEvent> eventType, Calendar<T> calendar, Entry<?> entry, String oldText) Constructs a new event used for signalling that an entry was assigned a new text (normally the title). The entry already carries a reference to new text and the event object will know the old one.
| |
| CalendarEvent | back to summary |
|---|---|
| public CalendarEvent(EventType<CalendarEvent> eventType, Calendar<T> calendar, Entry<?> entry, boolean oldFullDay) Constructs a new event used for signaling that an entry was set to full day. The entry already carries a reference to new full day value and the event object will know the old one.
| |
| getCalendar | back to summary |
|---|---|
| public final Calendar Returns the calendar for which the event was fired.
| |
| getEntry | back to summary |
|---|---|
| public Entry Returns the entry for which the event was fired.
| |
| getOldCalendar | back to summary |
|---|---|
| public final Calendar Returns the old calendar.
| |
| getOldFullDay | back to summary |
|---|---|
| public final boolean getOldFullDay() Returns the old value of the "full day" flag.
| |
| getOldInterval | back to summary |
|---|---|
| public Interval getOldInterval() Returns the old time interval of the modified entry.
| |
| getOldText | back to summary |
|---|---|
| public final String getOldText() Returns the old text.
| |
| getOldUserObject | back to summary |
|---|---|
| public Object getOldUserObject() Returns the old user object of the modified entry.
| |
| isDayChange | back to summary |
|---|---|
| public final boolean isDayChange() Determines whether the event will have an impact on different days. The method will return false if the user simply changed the start and / or end time of an entry within the current day. However, when the user drags the entry from one day to another then this method will return true.
| |
| isEntryAdded | back to summary |
|---|---|
| public final boolean isEntryAdded() A utility method to determine if the event describes the creation of a new
entry. This is the case when the event type is
| |
| isEntryRemoved | back to summary |
|---|---|
| public final boolean isEntryRemoved() A utility method to determine if the event describes the removal of an
entry. This is the case when the event type is
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a String representation of this EventObject. | |