Module javafx.controls
Package javafx.scene.control
Class SpinnerValueFactory.IntegerSpinnerValueFactory
- java.lang.Object
-
- javafx.scene.control.SpinnerValueFactory<Integer>
-
- javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory
-
- Enclosing class:
- SpinnerValueFactory<T>
public static class SpinnerValueFactory.IntegerSpinnerValueFactory extends SpinnerValueFactory<Integer>
ASpinnerValueFactory
implementation designed to iterate through integer values.Note that the default
converter
is implemented as anIntegerStringConverter
instance.- Since:
- JavaFX 8u40
-
-
Property Summary
Properties Type Property Description IntegerProperty
amountToStepBy
Sets the amount to increment or decrement by, per step.IntegerProperty
max
Sets the maximum allowable value for this value factoryIntegerProperty
min
Sets the minimum allowable value for this value factory-
Properties inherited from class javafx.scene.control.SpinnerValueFactory
converter, value, wrapAround
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javafx.scene.control.SpinnerValueFactory
SpinnerValueFactory.DoubleSpinnerValueFactory, SpinnerValueFactory.IntegerSpinnerValueFactory, SpinnerValueFactory.ListSpinnerValueFactory<T>
-
-
Constructor Summary
Constructors Constructor Description IntegerSpinnerValueFactory(int min, int max)
Constructs a new IntegerSpinnerValueFactory that sets the initial value to be equal to the min value, and a defaultamountToStepBy
of one.IntegerSpinnerValueFactory(int min, int max, int initialValue)
Constructs a new IntegerSpinnerValueFactory with a defaultamountToStepBy
of one.IntegerSpinnerValueFactory(int min, int max, int initialValue, int amountToStepBy)
Constructs a new IntegerSpinnerValueFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerProperty
amountToStepByProperty()
Sets the amount to increment or decrement by, per step.void
decrement(int steps)
Attempts to decrement thevalue
by the given number of steps.int
getAmountToStepBy()
Gets the value of the property amountToStepBy.int
getMax()
Gets the value of the property max.int
getMin()
Gets the value of the property min.void
increment(int steps)
Attempts to omcrement thevalue
by the given number of steps.IntegerProperty
maxProperty()
Sets the maximum allowable value for this value factoryIntegerProperty
minProperty()
Sets the minimum allowable value for this value factoryvoid
setAmountToStepBy(int value)
Sets the value of the property amountToStepBy.void
setMax(int value)
Sets the value of the property max.void
setMin(int value)
Sets the value of the property min.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class javafx.scene.control.SpinnerValueFactory
converterProperty, getConverter, getValue, isWrapAround, setConverter, setValue, setWrapAround, valueProperty, wrapAroundProperty
-
-
-
-
Property Detail
-
min
public final IntegerProperty minProperty
Sets the minimum allowable value for this value factory- Returns:
- the minimum allowable value for this value factory
-
max
public final IntegerProperty maxProperty
Sets the maximum allowable value for this value factory- See Also:
getMax()
,setMax(int)
-
amountToStepBy
public final IntegerProperty amountToStepByProperty
Sets the amount to increment or decrement by, per step.- See Also:
getAmountToStepBy()
,setAmountToStepBy(int)
-
-
Constructor Detail
-
IntegerSpinnerValueFactory
public IntegerSpinnerValueFactory(int min, int max)
Constructs a new IntegerSpinnerValueFactory that sets the initial value to be equal to the min value, and a defaultamountToStepBy
of one.- Parameters:
min
- The minimum allowed integer value for the Spinner.max
- The maximum allowed integer value for the Spinner.
-
IntegerSpinnerValueFactory
public IntegerSpinnerValueFactory(int min, int max, int initialValue)
Constructs a new IntegerSpinnerValueFactory with a defaultamountToStepBy
of one.- Parameters:
min
- The minimum allowed integer value for the Spinner.max
- The maximum allowed integer value for the Spinner.initialValue
- The value of the Spinner when first instantiated, must be within the bounds of the min and max arguments, or else the min value will be used.
-
IntegerSpinnerValueFactory
public IntegerSpinnerValueFactory(int min, int max, int initialValue, int amountToStepBy)
Constructs a new IntegerSpinnerValueFactory.- Parameters:
min
- The minimum allowed integer value for the Spinner.max
- The maximum allowed integer value for the Spinner.initialValue
- The value of the Spinner when first instantiated, must be within the bounds of the min and max arguments, or else the min value will be used.amountToStepBy
- The amount to increment or decrement by, per step.
-
-
Method Detail
-
setMin
public final void setMin(int value)
Sets the value of the property min.- Property description:
- * Properties * *
-
getMin
public final int getMin()
Gets the value of the property min.- Property description:
- * Properties * *
-
minProperty
public final IntegerProperty minProperty()
Sets the minimum allowable value for this value factory- Returns:
- the minimum allowable value for this value factory
-
setMax
public final void setMax(int value)
Sets the value of the property max.- Property description:
- Sets the maximum allowable value for this value factory
-
getMax
public final int getMax()
Gets the value of the property max.- Property description:
- Sets the maximum allowable value for this value factory
-
maxProperty
public final IntegerProperty maxProperty()
Sets the maximum allowable value for this value factory- See Also:
getMax()
,setMax(int)
-
setAmountToStepBy
public final void setAmountToStepBy(int value)
Sets the value of the property amountToStepBy.- Property description:
- Sets the amount to increment or decrement by, per step.
-
getAmountToStepBy
public final int getAmountToStepBy()
Gets the value of the property amountToStepBy.- Property description:
- Sets the amount to increment or decrement by, per step.
-
amountToStepByProperty
public final IntegerProperty amountToStepByProperty()
Sets the amount to increment or decrement by, per step.- See Also:
getAmountToStepBy()
,setAmountToStepBy(int)
-
decrement
public void decrement(int steps)
Attempts to decrement thevalue
by the given number of steps.- Specified by:
decrement
in classSpinnerValueFactory<Integer>
- Parameters:
steps
- The number of decrements that should be performed on the value.
-
increment
public void increment(int steps)
Attempts to omcrement thevalue
by the given number of steps.- Specified by:
increment
in classSpinnerValueFactory<Integer>
- Parameters:
steps
- The number of increments that should be performed on the value.
-
-