Top Description Inners Fields Constructors Methods
javafx.scene.control

public abstract Class SpinnerValueFactory<T>

extends Object
Class Inheritance
Known Direct Subclasses
javafx.scene.control.SpinnerValueFactory.ListSpinnerValueFactory, javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory, javafx.scene.control.SpinnerValueFactory.DoubleSpinnerValueFactory, javafx.scene.control.SpinnerValueFactory.LocalDateSpinnerValueFactory, javafx.scene.control.SpinnerValueFactory.LocalTimeSpinnerValueFactory
Type Parameters
<T>
The type of the data this value factory deals with, which must coincide with the type of the Spinner that the value factory is set on.
Imports
com.sun.javafx.util.Utils, javafx.beans.NamedArg, javafx.beans.property.BooleanProperty, .DoubleProperty, .IntegerProperty, .LongProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleDoubleProperty, .SimpleIntegerProperty, .SimpleLongProperty, .SimpleObjectProperty, javafx.collections.ListChangeListener, .ObservableList, .WeakListChangeListener, javafx.util.StringConverter, javafx.util.converter.IntegerStringConverter, java.lang.ref.WeakReference, java.math.BigDecimal, java.text.DecimalFormat, .ParseException, java.time.Duration, .LocalDate, .LocalTime, java.time.format.DateTimeFormatter, .FormatStyle, java.time.temporal.ChronoUnit, .TemporalUnit, java.util.List

The SpinnerValueFactory is the model behind the JavaFX Spinner control - without a value factory installed a Spinner is unusable. It is the role of the value factory to handle almost all aspects of the Spinner, including:

SpinnerValueFactory classes for some common types are provided with JavaFX, including:

Since
JavaFX 8u40
See Also
Spinner, SpinnerValueFactory.IntegerSpinnerValueFactory, SpinnerValueFactory.DoubleSpinnerValueFactory, SpinnerValueFactory.ListSpinnerValueFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
SpinnerValueFactory.DoubleSpinnerValueFactory

A javafx.scene.control.SpinnerValueFactory implementation designed to iterate through double values.

public static class
SpinnerValueFactory.IntegerSpinnerValueFactory

A javafx.scene.control.SpinnerValueFactory implementation designed to iterate through integer values.

public static class
SpinnerValueFactory.ListSpinnerValueFactory<
The type of the elements in the java.util.List.
T
>

A javafx.scene.control.SpinnerValueFactory implementation designed to iterate through a list of values.

pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private ObjectProperty<StringConverter<T>>
converter

Converts the user-typed input (when the Spinner is editable) to an object of type T, such that the input may be retrieved via the value property.

private ObjectProperty<T>
value

Represents the current value of the SpinnerValueFactory, or null if no value has been set.

private BooleanProperty
wrapAround

Specifies whether this SpinnerValueFactory wraps around from the maximum value to the minimum value, and vice versa.

Constructor Summary

AccessConstructor and Description
public
SpinnerValueFactory()

Creates a default SpinnerValueFactory.

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<StringConverter<T>>
public abstract void
decrement(int
The number of decrements that should be performed on the value. If the number is negative, the call is equivalent to calling increment(int) with the absolute value of steps.
steps
)

Attempts to decrement the value by the given number of steps.

public final StringConverter<T>
public final T
public abstract void
increment(int
The number of increments that should be performed on the value. If the number is negative, the call is equivalent to calling decrement(int) with the absolute number of steps.
steps
)

Attempts to increment the value by the given number of steps.

public final boolean
public final void
public final void
setValue(T newValue)

public final void
setWrapAround(boolean value)

public final ObjectProperty<T>
public final BooleanProperty
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait