Module
javafx.controls
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>
一个SpinnerValueFactory实现,旨在迭代整数值。请注意,默认的
converter实现为IntegerStringConverter实例。- 从以下版本开始:
- JavaFX 8u40
-
-
Property Summary
Properties Type Property 描述 IntegerPropertyamountToStepBy设置每步增加或减少的量。IntegerPropertymax设置该值工厂的最大允许值IntegerPropertymin设置该值工厂的最小允许值-
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 描述 IntegerSpinnerValueFactory(int min, int max)构造一个新的IntegerSpinnerValueFactory,将初始值设置为等于最小值,默认amountToStepBy。IntegerSpinnerValueFactory(int min, int max, int initialValue)构造一个新的IntegerSpinnerValueFactory,默认amountToStepBy。IntegerSpinnerValueFactory(int min, int max, int initialValue, int amountToStepBy)构造一个新的IntegerSpinnerValueFactory。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 IntegerPropertyamountToStepByProperty()设置每步增加或减少的量。voiddecrement(int steps)尝试按照给定的步数减少value。intgetAmountToStepBy()获取属性amountToStepBy的值。intgetMax()获取最大值的属性值。intgetMin()获取属性的值min。voidincrement(int steps)试图通过给定的步骤来弥补value。IntegerPropertymaxProperty()设置该值工厂的最大允许值IntegerPropertyminProperty()设置该值工厂的最小允许值voidsetAmountToStepBy(int value)设置属性amountToStepBy的值。voidsetMax(int value)设置属性max的值。voidsetMin(int value)设置属性的值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
设置该值工厂的最小允许值- 结果
- 该值工厂的最小允许值
-
max
public final IntegerProperty maxProperty
设置该值工厂的最大允许值- 另请参见:
-
getMax(),setMax(int)
-
amountToStepBy
public final IntegerProperty amountToStepByProperty
设置每步增加或减少的量。
-
-
构造方法详细信息
-
IntegerSpinnerValueFactory
public IntegerSpinnerValueFactory(int min, int max)构造一个新的IntegerSpinnerValueFactory,将初始值设置为等于最小值,默认amountToStepBy。- 参数
-
min- Spinner的最小允许整数值。 -
max- Spinner允许的最大允许值。
-
IntegerSpinnerValueFactory
public IntegerSpinnerValueFactory(int min, int max, int initialValue)构造一个新的IntegerSpinnerValueFactory,默认amountToStepBy。- 参数
-
min- Spinner的最小允许整数值。 -
max- Spinner允许的最大整数值。 -
initialValue- 当第一次实例化时,微调器的值必须在min和max参数的范围内,否则将使用最小值。
-
IntegerSpinnerValueFactory
public IntegerSpinnerValueFactory(int min, int max, int initialValue, int amountToStepBy)构造一个新的IntegerSpinnerValueFactory。- 参数
-
min- Spinner的最小允许整数值。 -
max- Spinner的最大允许整数值。 -
initialValue- 当第一个实例化时,Spinner的值必须在min和max参数的范围之内,否则将使用最小值。 -
amountToStepBy- 每步骤增加或减少的量。
-
-
方法详细信息
-
setMin
public final void setMin(int value)
设置属性的值min。- Property description:
- *属性* *
-
getMin
public final int getMin()
获取属性的值min。- Property description:
- *属性* *
-
minProperty
public final IntegerProperty minProperty()
设置该值工厂的最小允许值- 结果
- 该值工厂的最小允许值
-
setMax
public final void setMax(int value)
设置属性max的值。- Property description:
- 设置该值工厂的最大允许值
-
getMax
public final int getMax()
获取最大值的属性值。- Property description:
- 设置该值工厂的最大允许值
-
maxProperty
public final IntegerProperty maxProperty()
设置该值工厂的最大允许值- 另请参见:
-
getMax(),setMax(int)
-
setAmountToStepBy
public final void setAmountToStepBy(int value)
设置属性amountToStepBy的值。- Property description:
- 设置每步增加或减少的量。
-
getAmountToStepBy
public final int getAmountToStepBy()
获取属性amountToStepBy的值。- Property description:
- 设置每步增加或减少的量。
-
amountToStepByProperty
public final IntegerProperty amountToStepByProperty()
设置每步增加或减少的量。
-
decrement
public void decrement(int steps)
尝试按照给定的步数减少value。- Specified by:
-
decrement在SpinnerValueFactory<Integer> - 参数
-
steps- 应该对该值执行的减量的数量。
-
increment
public void increment(int steps)
试图通过给定的步数来剔除value。- Specified by:
-
increment在SpinnerValueFactory<Integer> - 参数
-
steps- 应对值执行的增量数。
-
-