Class SpinnerValueFactory.IntegerSpinnerValueFactory
- javafx.scene.control.SpinnerValueFactory<Integer>
-
- javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory
Enclosing class:
public static class SpinnerValueFactory.IntegerSpinnerValueFactory extends SpinnerValueFactory<Integer>
SpinnerValueFactory implementation designed to iterate through integer values. Note that the default converter is implemented as an IntegerStringConverter instance.
Since:
JavaFX 8u40
-
Property Summary
All MethodsInstance MethodsConcrete Methods Type Property and Description IntegerPropertyamountToStepBySets the amount to increment or decrement by, per step.IntegerPropertymaxSets the maximum allowable value for this value factoryIntegerPropertyminSets 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 and Description IntegerSpinnerValueFactory(int min, int max)Constructs a new IntegerSpinnerValueFactory that sets the initial value to be equal to the min value, and a defaultamountToStepByof one.IntegerSpinnerValueFactory(int min, int max, int initialValue)Constructs a new IntegerSpinnerValueFactory with a defaultamountToStepByof one.IntegerSpinnerValueFactory(int min, int max, int initialValue, int amountToStepBy)Constructs a new IntegerSpinnerValueFactory.
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description IntegerPropertyamountToStepByProperty()Sets the amount to increment or decrement by, per step.voiddecrement(int steps)Attempts to decrement thevalueby the given number of steps.intgetAmountToStepBy()Gets the value of the property amountToStepBy.intgetMax()Gets the value of the property max.intgetMin()Gets the value of the property min.voidincrement(int steps)Attempts to omcrement thevalueby the given number of steps.IntegerPropertymaxProperty()Sets the maximum allowable value for this value factoryIntegerPropertyminProperty()Sets the minimum allowable value for this value factoryvoidsetAmountToStepBy(int value)Sets the value of the property amountToStepBy.voidsetMax(int value)Sets the value of the property max.voidsetMin(int value)Sets the value of the property min.-
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
-
max
public final IntegerProperty maxProperty
Sets the maximum allowable value for this value factorySee Also:
-
amountToStepBy
public final IntegerProperty amountToStepByProperty
Sets the amount to increment or decrement by, per step.See Also:
-
-
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 defaultamountToStepByof one.Parameters:
min- The minimum allowed integer value for the Spinner.
-
IntegerSpinnerValueFactory
public IntegerSpinnerValueFactory(int min, int max, int initialValue)Constructs a new IntegerSpinnerValueFactory with a defaultamountToStepByof one.Parameters:
min- The minimum allowed integer value for the Spinner.
-
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.
-
-
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
-
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 factorySee Also:
-
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:
-
decrement
public void decrement(int steps)
Attempts to decrement thevalueby the given number of steps.Specified by:
decrementin classSpinnerValueFactory<Integer>Parameters:
steps- The number of decrements that should be performed on the value.
-
increment
public void increment(int steps)
Attempts to omcrement thevalueby the given number of steps.Specified by:
incrementin classSpinnerValueFactory<Integer>Parameters:
steps- The number of increments that should be performed on the value.
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.