Module MaterialFX
Class IntegerSpinnerModel
java.lang.Object
io.github.palexdev.materialfx.controls.models.spinner.AbstractSpinnerModel<T>
io.github.palexdev.materialfx.controls.models.spinner.NumberSpinnerModel<Integer>
io.github.palexdev.materialfx.controls.models.spinner.IntegerSpinnerModel
- All Implemented Interfaces:
SpinnerModel<Integer>
Concrete implementation of
NumberSpinnerModel to work with integer value.
The constructor initializes the model with these values:
- The converter uses Integer.parseInt(String) and Objects.toString(Object)
- The default value is 0
- The min value is 0
- The max value is Integer.MAX_VALUE
- The increment is 1
- The initial value depends on the chosen constructor
-
Property Summary
Properties inherited from class io.github.palexdev.materialfx.controls.models.spinner.NumberSpinnerModel
converter, increment, max, minProperties 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 TypeMethodDescriptionvoidnext()Increments the current value byNumberSpinnerModel.incrementProperty().voidprevious()Decrements the current value byNumberSpinnerModel.incrementProperty().Methods inherited from class io.github.palexdev.materialfx.controls.models.spinner.NumberSpinnerModel
converterProperty, getConverter, getIncrement, getMax, getMin, incrementProperty, maxProperty, minProperty, setConverter, setIncrement, setMax, setMinMethods inherited from class io.github.palexdev.materialfx.controls.models.spinner.AbstractSpinnerModel
defaultValueProperty, getDefaultValue, getValue, isWrapAround, reset, setDefaultValue, setValue, setWrapAround, valueProperty
-
Constructor Details
-
IntegerSpinnerModel
public IntegerSpinnerModel() -
IntegerSpinnerModel
public IntegerSpinnerModel(int initialValue)
-
-
Method Details
-
next
public void next()Increments the current value byNumberSpinnerModel.incrementProperty(). If the new value is greater than theNumberSpinnerModel.maxProperty()andAbstractSpinnerModel.isWrapAround()is true the new value will be theNumberSpinnerModel.minProperty(). -
previous
public void previous()Decrements the current value byNumberSpinnerModel.incrementProperty(). If the new value is lesser than theNumberSpinnerModel.minProperty()andAbstractSpinnerModel.isWrapAround()is true the new value will be theNumberSpinnerModel.maxProperty().
-