CalendarSource. These calendar sources are then added to
DateControl#getCalendarSources().
// create the calendar and listen to all changes
Calendar calendar = new Calendar("Home");
calendar.addEventHandler(CalendarEvent.ANY, evt -> handleEvent(evt));
// create the calendar source and attach the calendar
CalendarSource source = new CalendarSource("Online Calendars");
source.getCalendars().add(calendar);
// attach the source to the date control / calendar view.
CalendarView view = new CalendarView();
view.getCalendarSources().add(source);
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Calendar.
Predefined visual styles for calendars. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private final ObservableList | |
| private boolean | |
| private final IntervalTree | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final StringProperty | |
| private final BooleanProperty | |
| private final StringProperty | |
| private final StringProperty | |
| private final ObjectProperty |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public final void | addEntries(Collection<Entry<?>>
the collection of entries to add entries)Adds the given entries to the calendar. |
| public final void | addEntries(Iterator<Entry<?>>
the entries to add entries)Adds the entries returned by the iterator to the calendar. |
| public final void | addEntries(Iterable<Entry<?>>
the entries to add entries)Adds the entries returned by the iterable to the calendar. |
| public final void | |
| private void | |
| public final void | addEventHandler(EventHandler<CalendarEvent>
the event handler to add l)Adds an event handler for calendar events. |
| public final EventDispatchChain | buildEventDispatchChain(EventDispatchChain
the initial chain to build from givenTail)Implements javafx. Construct an event dispatch chain for this target. |
| private Interval | calculateSourceBoundsFromRecurrenceBounds(Entry<?> source, Entry<?> recurrence, Interval oldInterval)
|
| public final void | |
| private Map | |
| public final Map | Returns: a map filled with list of entries for given daysthe start of the time interval startDate, LocalDate the end of the time interval endDate, ZoneId the time zone for which to find entries zoneId)Queries the calendar for all entries within the time interval defined by the start date and end date. |
| public List | Returns: a list of entries that match the searchthe search text searchText)Queries the calendar for entries that match the given search text. |
| public final void | fireEvent(CalendarEvent
the event to fire evt)Fires the given calendar event to all event handlers currently registered with this calendar. |
| public final Instant | Returns: An instant representing the earliest time, can be null if no entries are contained.Gets the earliest time used by this calendar, that means the start of the first entry stored. |
| public final Instant | Returns: An instant representing the latest time, can be null if no entries are contained.Gets the latest time used by this calendar, that means the end of the last entry stored. |
| public final Duration | Returns: the look ahead durationReturns the value of |
| public final Duration | Returns: the look back durationReturns the value of |
| public final String | |
| public final String | |
| public final String | |
| public final T | |
| pack-priv final void | |
| pack-priv final void | |
| public final boolean | Returns: true if the calendar can not be edited by the userReturns the value of |
| public final ObjectProperty | Returns: the look ahead durationStores a time duration used for the entry search functionality of this calendar. |
| public final ObjectProperty | Returns: the look back durationStores a time duration used for the entry search functionality of this calendar. |
| public final StringProperty | Returns: the property used for storing the calendar nameA property used to store the name of the calendar. |
| public final BooleanProperty | Returns: true if the calendar is read-only (default is false)A property used to control if the calendar is read-only or not. |
| public final void | |
| public final void | removeEntries(Collection<Entry<?>>
the collection of entries to remove entries)Removes the given entries from the calendar. |
| public final void | removeEntries(Iterator<Entry<?>>
the entries to remove entries)Removes the entries returned by the iterator from the calendar. |
| public final void | removeEntries(Iterable<Entry<?>>
the entries to add entries)Adds the entries returned by the iterable to the calendar. |
| public final void | |
| public final void | removeEventHandler(EventHandler<CalendarEvent>
the event handler to remove l)Removes an event handler from the calendar. |
| public final void | setLookAheadDuration(Duration
the look ahead duration duration)Sets the value of |
| public final void | setLookBackDuration(Duration
the look back duration duration)Sets the value of |
| public final void | |
| public final void | setReadOnly(boolean
the calendar can not be edited by the user if true readOnly)Sets the value of |
| public final void | |
| public final void | setStyle(Calendar.
the calendar style styleSets the value of |
| public final void | |
| public final void | |
| public final StringProperty | Returns: the property used for storing the calendar short nameA property used to store the short name of the calendar. |
| public final void | |
| public final void | |
| public final StringProperty | Returns: the visual calendar styleA property used to store the visual style that will be used for the calendar in the UI. |
| public String | |
| private void | |
| public final ObjectProperty | Returns: a user objectAn (optional) user object that can be used to link this calendar to the source of its data or the business object that it represents. |
| batchUpdates | back to summary |
|---|---|
| private boolean batchUpdates | |
| dirty | back to summary |
|---|---|
| private boolean dirty | |
| eventHandlers | back to summary |
|---|---|
| private final ObservableList<EventHandler<CalendarEvent>> eventHandlers | |
| fireEvents | back to summary |
|---|---|
| private boolean fireEvents | |
| intervalTree | back to summary |
|---|---|
| private final IntervalTree<Entry<?>> intervalTree | |
| lookAheadDuration | back to summary |
|---|---|
| private final ObjectProperty<Duration> lookAheadDuration | |
| lookBackDuration | back to summary |
|---|---|
| private final ObjectProperty<Duration> lookBackDuration | |
| name | back to summary |
|---|---|
| private final StringProperty name | |
| readOnly | back to summary |
|---|---|
| private final BooleanProperty readOnly | |
| shortName | back to summary |
|---|---|
| private final StringProperty shortName | |
| style | back to summary |
|---|---|
| private final StringProperty style | |
| userObject | back to summary |
|---|---|
| private final ObjectProperty<T> userObject | |
| Calendar | back to summary |
|---|---|
| public Calendar() Constructs a new calendar. | |
| Calendar | back to summary |
|---|---|
| public Calendar(String name, T userObject) Constructs a new calendar with the given name.
| |
| Calendar | back to summary |
|---|---|
| public Calendar(String name) Constructs a new calendar with the given name.
| |
| addEntries | back to summary |
|---|---|
| public final void addEntries(Entry<?>... entries) Adds the given entries to the calendar. This is basically just a convenience
method as the actual work of adding an entry to a calendar is done inside
| |
| addEntries | back to summary |
|---|---|
| public final void addEntries(Collection<Entry<?>> entries) Adds the given entries to the calendar. This is basically just a convenience
method as the actual work of adding an entry to a calendar is done inside
| |
| addEntries | back to summary |
|---|---|
| public final void addEntries(Iterator<Entry<?>> entries) Adds the entries returned by the iterator to the calendar. This is basically just a convenience
method as the actual work of adding an entry to a calendar is done inside | |
| addEntries | back to summary |
|---|---|
| public final void addEntries(Iterable<Entry<?>> entries) Adds the entries returned by the iterable to the calendar. This is basically just a convenience
method as the actual work of adding an entry to a calendar is done inside | |
| addEntry | back to summary |
|---|---|
| public final void addEntry(Entry<?> entry) Adds the given entry to the calendar. This is basically just a convenience
method as the actual work of adding an entry to a calendar is done inside
| |
| addEntryToResult | back to summary |
|---|---|
| private void addEntryToResult(Map<LocalDate, List<Entry<?>>> result, Entry<?> entry, LocalDate startDate, LocalDate endDate) | |
| addEventHandler | back to summary |
|---|---|
| public final void addEventHandler(EventHandler<CalendarEvent> l) Adds an event handler for calendar events. Handlers will be called when an entry gets added, removed, changes, etc.
| |
| buildEventDispatchChain | back to summary |
|---|---|
| public final EventDispatchChain buildEventDispatchChain(EventDispatchChain givenTail) Implements javafx. Doc from javafx. Construct an event dispatch chain for this target. The event dispatch
chain contains event dispatchers which might be interested in processing
of events targeted at this In the case the event target is part of some hierarchy, the chain for it is usually built from event dispatchers collected from the root of the hierarchy to the event target. The event dispatch chain is constructed by modifications to the provided initial event dispatch chain. The returned chain should have the initial chain at its end so the dispatchers should be prepended to the initial chain. The caller shouldn't assume that the initial chain remains unchanged nor that the returned value will reference a different chain.
| |
| calculateSourceBoundsFromRecurrenceBounds | back to summary |
|---|---|
| private Interval calculateSourceBoundsFromRecurrenceBounds(Entry<?> source, Entry<?> recurrence, Interval oldInterval) | |
| clear | back to summary |
|---|---|
| public final void clear() Removes all entries from the calendar. Fires an
| |
| doGetEntries | back to summary |
|---|---|
private Map
| |
| findEntries | back to summary |
|---|---|
| public final Map Queries the calendar for all entries within the time interval defined by the start date and end date. | |
| findEntries | back to summary |
|---|---|
| public List Queries the calendar for entries that match the given search text. The method can be overridden to implement custom find / search strategies.
| |
| fireEvent | back to summary |
|---|---|
| public final void fireEvent(CalendarEvent evt) Fires the given calendar event to all event handlers currently registered with this calendar.
| |
| getEarliestTimeUsed | back to summary |
|---|---|
| public final Instant getEarliestTimeUsed() Gets the earliest time used by this calendar, that means the start of the first entry stored.
| |
| getLatestTimeUsed | back to summary |
|---|---|
| public final Instant getLatestTimeUsed() Gets the latest time used by this calendar, that means the end of the last entry stored.
| |
| getLookAheadDuration | back to summary |
|---|---|
| public final Duration getLookAheadDuration() Returns the value of
| |
| getLookBackDuration | back to summary |
|---|---|
| public final Duration getLookBackDuration() Returns the value of
| |
| getName | back to summary |
|---|---|
| public final String getName() Returns the value of
| |
| getShortName | back to summary |
|---|---|
| public final String getShortName() Returns the value of
| |
| getStyle | back to summary |
|---|---|
| public final String getStyle() Returns the value of
| |
| getUserObject | back to summary |
|---|---|
| public final T getUserObject() | |
| impl_addEntry | back to summary |
|---|---|
| pack-priv final void impl_addEntry(Entry<?> entry) | |
| impl_removeEntry | back to summary |
|---|---|
| pack-priv final void impl_removeEntry(Entry<?> entry) | |
| isReadOnly | back to summary |
|---|---|
| public final boolean isReadOnly() Returns the value of
| |
| lookAheadDurationProperty | back to summary |
|---|---|
| public final ObjectProperty Stores a time duration used for the entry search functionality of this calendar. The look ahead and the look back durations limit the search to the time interval [now - lookBackDuration, now + lookAheadDuration]. The default value of this property is 730 days (2 years).
| |
| lookBackDurationProperty | back to summary |
|---|---|
| public final ObjectProperty Stores a time duration used for the entry search functionality of this calendar. The look ahead and the look back durations limit the search to the time interval [now - lookBackDuration, now + lookAheadDuration]. The default value of this property is 730 days (2 years).
| |
| nameProperty | back to summary |
|---|---|
| public final StringProperty nameProperty() A property used to store the name of the calendar.
| |
| readOnlyProperty | back to summary |
|---|---|
| public final BooleanProperty readOnlyProperty() A property used to control if the calendar is read-only or not.
| |
| removeEntries | back to summary |
|---|---|
| public final void removeEntries(Entry<?>... entries) Removes the given entries from the calendar. This is basically just a convenience
method as the actual work of removing an entry from a calendar is done inside
| |
| removeEntries | back to summary |
|---|---|
| public final void removeEntries(Collection<Entry<?>> entries) Removes the given entries from the calendar. This is basically just a convenience
method as the actual work of removing an entry from a calendar is done inside
| |
| removeEntries | back to summary |
|---|---|
| public final void removeEntries(Iterator<Entry<?>> entries) Removes the entries returned by the iterator from the calendar. This is basically just a convenience
method as the actual work of removing an entry from a calendar is done inside | |
| removeEntries | back to summary |
|---|---|
| public final void removeEntries(Iterable<Entry<?>> entries) Adds the entries returned by the iterable to the calendar. This is basically just a convenience
method as the actual work of adding an entry to a calendar is done inside | |
| removeEntry | back to summary |
|---|---|
| public final void removeEntry(Entry<?> entry) Removes the given entry from the calendar. This is basically just a convenience
method as the actual work of removing an entry from a calendar is done inside
| |
| removeEventHandler | back to summary |
|---|---|
| public final void removeEventHandler(EventHandler<CalendarEvent> l) Removes an event handler from the calendar.
| |
| setLookAheadDuration | back to summary |
|---|---|
| public final void setLookAheadDuration(Duration duration) Sets the value of
| |
| setLookBackDuration | back to summary |
|---|---|
| public final void setLookBackDuration(Duration duration) Sets the value of
| |
| setName | back to summary |
|---|---|
| public final void setName(String name) Sets the value of
| |
| setReadOnly | back to summary |
|---|---|
| public final void setReadOnly(boolean readOnly) Sets the value of
| |
| setShortName | back to summary |
|---|---|
| public final void setShortName(String name) Sets the value of
| |
| setStyle | back to summary |
|---|---|
| public final void setStyle(Calendar. Sets the value of | |
| setStyle | back to summary |
|---|---|
| public final void setStyle(String stylePrefix) Sets the value of
| |
| setUserObject | back to summary |
|---|---|
| public final void setUserObject(T userObject) | |
| shortNameProperty | back to summary |
|---|---|
| public final StringProperty shortNameProperty() A property used to store the short name of the calendar.
| |
| startBatchUpdates | back to summary |
|---|---|
| public final void startBatchUpdates() Tells the calendar that the application will perform a large number of changes.
While batch updates in progress the calendar will stop to fire events. To finish
this mode the application has to call | |
| stopBatchUpdates | back to summary |
|---|---|
| public final void stopBatchUpdates() Tells the calendar that the application is done making big changes. Invoking
this method will trigger a calendar event of type | |
| styleProperty | back to summary |
|---|---|
| public final StringProperty styleProperty() A property used to store the visual style that will be used for the calendar in the UI. A style can be any arbitrary name. The style will be used as a prefix to find the styles in the stylesheet. For examples please search the standard framework stylesheet for the predefined styles "style1-", "style2-", etc.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| updateRecurrenceSourceEntry | back to summary |
|---|---|
private void updateRecurrenceSourceEntry(CalendarEvent evt, Entry<T> source)
| |
| userObjectProperty | back to summary |
|---|---|
| public final ObjectProperty An (optional) user object that can be used to link this calendar to the source of its data or the business object that it represents.
| |
Calendar#setStyle(Style)
| Modifier and Type | Field and Description |
|---|---|
| public static final Calendar. | STYLE1
Default style "1". |
| public static final Calendar. | STYLE2
Default style "2". |
| public static final Calendar. | STYLE3
Default style "3". |
| public static final Calendar. | STYLE4
Default style "4". |
| public static final Calendar. | STYLE5
Default style "5". |
| public static final Calendar. | STYLE6
Default style "6". |
| public static final Calendar. | STYLE7
Default style "7". |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Calendar. | Returns: a style, guaranteed to be non-nullthe ordinal value for which to return a style ordinal)Returns a style for the given ordinal. |
| public static Calendar. | |
| public static Calendar. |
| STYLE1 | back to summary |
|---|---|
| public static final Calendar. Default style "1". | |
| STYLE2 | back to summary |
|---|---|
| public static final Calendar. Default style "2". | |
| STYLE3 | back to summary |
|---|---|
| public static final Calendar. Default style "3". | |
| STYLE4 | back to summary |
|---|---|
| public static final Calendar. Default style "4". | |
| STYLE5 | back to summary |
|---|---|
| public static final Calendar. Default style "5". | |
| STYLE6 | back to summary |
|---|---|
| public static final Calendar. Default style "6". | |
| STYLE7 | back to summary |
|---|---|
| public static final Calendar. Default style "7". | |
| Style | back to summary |
|---|---|
| private Style() | |
| getStyle | back to summary |
|---|---|
| public static Calendar. Returns a style for the given ordinal. This method is implemented with a roll over strategy: the final ordinal value is the given ordinal value modulo the number of elements in this enum. | |
| valueOf | back to summary |
|---|---|
| public static Calendar. | |
| values | back to summary |
|---|---|
| public static Calendar. | |