Module MaterialFX
Class LocalDateSpinnerModel
java.lang.Object
io.github.palexdev.materialfx.controls.models.spinner.AbstractSpinnerModel<LocalDate>
io.github.palexdev.materialfx.controls.models.spinner.LocalDateSpinnerModel
- All Implemented Interfaces:
SpinnerModel<LocalDate>
Concrete implementation of
AbstractSpinnerModel to work with LocalDate values.
LocalDateSpinnerModel adds the converterProperty() (since we know the kind of data the model will deal with),
and three new properties, minProperty(), maxProperty() and incrementProperty().
The constructor initializes the model with these values:
- The converter uses DateStringConverter with format FormatStyle.MEDIUM
- The default value is LocalDate.EPOCH
- The min value is LocalDate.EPOCH
- The max value is LocalDate.MAX
- The increment is Duration.ofDays(long), 1 day
- The initial value depends on the chosen constructor
-
Property Summary
PropertiesTypePropertyDescriptionSpecifies theStringConverterused to convert the spinner value to a String.Specifies the increment/decrement value to add/subtract from the current index when callingnext()orprevious().Specifies the maximum date reachable by the spinner.Specifies the minimum date reachable by the spinner.Properties inherited from class io.github.palexdev.materialfx.controls.models.spinner.AbstractSpinnerModel
defaultValue, value -
Field Summary
Fields inherited from class io.github.palexdev.materialfx.controls.models.spinner.AbstractSpinnerModel
defaultValue, value, wrapAround -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecifies theStringConverterused to convert the spinner value to a String.Gets the value of the property converter.Gets the value of the property increment.getMax()Gets the value of the property max.getMin()Gets the value of the property min.Specifies the increment/decrement value to add/subtract from the current index when callingnext()orprevious().Specifies the maximum date reachable by the spinner.Specifies the minimum date reachable by the spinner.voidnext()Steps to the next value.voidprevious()Steps to the previous value.voidsetConverter(StringConverter<LocalDate> converter) Sets the value of the property converter.voidsetIncrement(TemporalAmount increment) Sets the value of the property increment.voidSets the value of the property max.voidSets the value of the property min.Methods inherited from class io.github.palexdev.materialfx.controls.models.spinner.AbstractSpinnerModel
defaultValueProperty, getDefaultValue, getValue, isWrapAround, reset, setDefaultValue, setValue, setWrapAround, valueProperty
-
Property Details
-
converter
- See Also:
-
min
Specifies the minimum date reachable by the spinner.- See Also:
-
max
Specifies the maximum date reachable by the spinner.- See Also:
-
increment
Specifies the increment/decrement value to add/subtract from the current index when callingnext()orprevious(). The amount is a genericTemporalAmount.- See Also:
-
-
Constructor Details
-
LocalDateSpinnerModel
public LocalDateSpinnerModel() -
LocalDateSpinnerModel
-
-
Method Details
-
next
public void next()Description copied from interface:SpinnerModelSteps to the next value. -
previous
public void previous()Description copied from interface:SpinnerModelSteps to the previous value. -
getConverter
Gets the value of the property converter.- Property description:
-
converterProperty
Description copied from interface:SpinnerModelSpecifies theStringConverterused to convert the spinner value to a String.- See Also:
-
setConverter
Sets the value of the property converter.- Property description:
-
getMin
Gets the value of the property min.- Property description:
- Specifies the minimum date reachable by the spinner.
-
minProperty
Specifies the minimum date reachable by the spinner.- See Also:
-
setMin
Sets the value of the property min.- Property description:
- Specifies the minimum date reachable by the spinner.
-
getMax
Gets the value of the property max.- Property description:
- Specifies the maximum date reachable by the spinner.
-
maxProperty
Specifies the maximum date reachable by the spinner.- See Also:
-
setMax
Sets the value of the property max.- Property description:
- Specifies the maximum date reachable by the spinner.
-
getIncrement
Gets the value of the property increment.- Property description:
- Specifies the increment/decrement value to add/subtract from
the current index when calling
next()orprevious(). The amount is a genericTemporalAmount.
-
incrementProperty
Specifies the increment/decrement value to add/subtract from the current index when callingnext()orprevious(). The amount is a genericTemporalAmount.- See Also:
-
setIncrement
Sets the value of the property increment.- Property description:
- Specifies the increment/decrement value to add/subtract from
the current index when calling
next()orprevious(). The amount is a genericTemporalAmount.
-