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.
Type | Property and Description |
---|---|
IntegerProperty |
amountToStepBy
Sets the amount to increment or decrement by, per step.
|
IntegerProperty |
max
Sets the maximum allowable value for this value factory
|
IntegerProperty |
min
Sets the minimum allowable value for this value factory
|
converter, value, wrapAround
SpinnerValueFactory.DoubleSpinnerValueFactory, SpinnerValueFactory.IntegerSpinnerValueFactory, SpinnerValueFactory.ListSpinnerValueFactory<T>
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 default
amountToStepBy of one. |
IntegerSpinnerValueFactory(int min,
int max,
int initialValue)
Constructs a new IntegerSpinnerValueFactory with a default
amountToStepBy of one. |
IntegerSpinnerValueFactory(int min,
int max,
int initialValue,
int amountToStepBy)
Constructs a new IntegerSpinnerValueFactory.
|
Modifier and Type | Method and Description |
---|---|
IntegerProperty |
amountToStepByProperty()
Sets the amount to increment or decrement by, per step.
|
void |
decrement(int steps)
Attempts to decrement the
value 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 the
value by the given
number of steps. |
IntegerProperty |
maxProperty()
Sets the maximum allowable value for this value factory
|
IntegerProperty |
minProperty()
Sets the minimum allowable value for this value factory
|
void |
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.
|
converterProperty, getConverter, getValue, isWrapAround, setConverter, setValue, setWrapAround, valueProperty, wrapAroundProperty
public final IntegerProperty minProperty
public final IntegerProperty maxProperty
getMax()
,
setMax(int)
public final IntegerProperty amountToStepByProperty
getAmountToStepBy()
,
setAmountToStepBy(int)
public IntegerSpinnerValueFactory(int min, int max)
amountToStepBy
of one.min
- The minimum allowed integer value for the Spinner.max
- The maximum allowed integer value for the Spinner.public IntegerSpinnerValueFactory(int min, int max, int initialValue)
amountToStepBy
of one.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.public IntegerSpinnerValueFactory(int min, int max, int initialValue, int amountToStepBy)
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.public final void setMin(int value)
public final int getMin()
public final IntegerProperty minProperty()
public final void setMax(int value)
public final int getMax()
public final IntegerProperty maxProperty()
getMax()
,
setMax(int)
public final void setAmountToStepBy(int value)
public final int getAmountToStepBy()
public final IntegerProperty amountToStepByProperty()
getAmountToStepBy()
,
setAmountToStepBy(int)
public void decrement(int steps)
value
by the given
number of steps.decrement
in class SpinnerValueFactory<Integer>
steps
- The number of decrements that should be performed on the value.public void increment(int steps)
value
by the given
number of steps.increment
in class SpinnerValueFactory<Integer>
steps
- The number of increments that should be performed on the value.Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.