Class CalendarView.SelectionModel
java.lang.Object
com.dlsc.gemsfx.CalendarView.SelectionModel
- Enclosing class:
CalendarView
Tracks selected dates for a
CalendarView.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines how many dates can be selected. -
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ObjectProperty<LocalDate> The primary selected date.final javafx.beans.property.ListProperty<LocalDate> The selected dates used by multiple-date selection.final javafx.beans.property.ObjectProperty<LocalDate> The selected end date used by range selection.final javafx.beans.property.ObjectProperty<CalendarView.SelectionModel.SelectionMode> The current selection mode. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearAndSelect(LocalDate date) Clears the current selection and selects the given date.final voidClears all selected dates.voidclearSelection(LocalDate date) Clears or removes the given date according to the current selection mode.final LocalDateGets the value of theselectedDateproperty.final javafx.collections.ObservableList<LocalDate> Gets the value of theselectedDatesproperty.final LocalDateGets the value of theselectedEndDateproperty.Gets the value of theselectionModeproperty.booleanisSelected(LocalDate date) Checks whether the given date is selected.voidSelects the given date according to the current selection mode.final javafx.beans.property.ObjectProperty<LocalDate> The primary selected date.final javafx.beans.property.ListProperty<LocalDate> The selected dates used by multiple-date selection.final javafx.beans.property.ObjectProperty<LocalDate> The selected end date used by range selection.final javafx.beans.property.ObjectProperty<CalendarView.SelectionModel.SelectionMode> The current selection mode.final voidsetSelectedDate(LocalDate selectedDate) Sets the value of theselectedDateproperty.final voidsetSelectedDates(javafx.collections.ObservableList<LocalDate> selectedDates) Sets the value of theselectedDatesproperty.final voidsetSelectedEndDate(LocalDate selectedEndDate) Sets the value of theselectedEndDateproperty.final voidsetSelectionMode(CalendarView.SelectionModel.SelectionMode selectionMode) Sets the value of theselectionModeproperty.
-
Property Details
-
selectionMode
public final javafx.beans.property.ObjectProperty<CalendarView.SelectionModel.SelectionMode> selectionModePropertyThe current selection mode.- See Also:
-
selectedDate
The primary selected date.- See Also:
-
selectedEndDate
The selected end date used by range selection.- See Also:
-
selectedDates
The selected dates used by multiple-date selection.- See Also:
-
-
Constructor Details
-
SelectionModel
public SelectionModel()Creates a new selection model.
-
-
Method Details
-
clearSelection
public final void clearSelection()Clears all selected dates. -
getSelectionMode
Gets the value of theselectionModeproperty.- Property description:
- The current selection mode.
- Returns:
- the value of the
selectionModeproperty - See Also:
-
selectionModeProperty
public final javafx.beans.property.ObjectProperty<CalendarView.SelectionModel.SelectionMode> selectionModeProperty()The current selection mode.- Returns:
- the selection mode property
- See Also:
-
setSelectionMode
Sets the value of theselectionModeproperty.- Property description:
- The current selection mode.
- Parameters:
selectionMode- the value for theselectionModeproperty- See Also:
-
clearAndSelect
Clears the current selection and selects the given date.- Parameters:
date- the date to select
-
select
Selects the given date according to the current selection mode.- Parameters:
date- the date to select
-
clearSelection
Clears or removes the given date according to the current selection mode.- Parameters:
date- the date to clear
-
isSelected
Checks whether the given date is selected.- Parameters:
date- the date to test- Returns:
- true if the date is selected
-
getSelectedDate
Gets the value of theselectedDateproperty.- Property description:
- The primary selected date.
- Returns:
- the value of the
selectedDateproperty - See Also:
-
selectedDateProperty
The primary selected date.- Returns:
- the selected date property
- See Also:
-
setSelectedDate
Sets the value of theselectedDateproperty.- Property description:
- The primary selected date.
- Parameters:
selectedDate- the value for theselectedDateproperty- See Also:
-
getSelectedEndDate
Gets the value of theselectedEndDateproperty.- Property description:
- The selected end date used by range selection.
- Returns:
- the value of the
selectedEndDateproperty - See Also:
-
selectedEndDateProperty
The selected end date used by range selection.- Returns:
- the selected end date property
- See Also:
-
setSelectedEndDate
Sets the value of theselectedEndDateproperty.- Property description:
- The selected end date used by range selection.
- Parameters:
selectedEndDate- the value for theselectedEndDateproperty- See Also:
-
getSelectedDates
Gets the value of theselectedDatesproperty.- Property description:
- The selected dates used by multiple-date selection.
- Returns:
- the value of the
selectedDatesproperty - See Also:
-
selectedDatesProperty
The selected dates used by multiple-date selection.- Returns:
- the selected dates property
- See Also:
-
setSelectedDates
Sets the value of theselectedDatesproperty.- Property description:
- The selected dates used by multiple-date selection.
- Parameters:
selectedDates- the value for theselectedDatesproperty- See Also:
-