java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
jfxtras.scene.control.ListSpinner<T>
- All Implemented Interfaces:
javafx.css.Styleable
,javafx.event.EventTarget
,javafx.scene.control.Skinnable
public class ListSpinner<T>
extends javafx.scene.control.Control
This is a spinner, showing one value at a time from a list.
This value is set and retrieved through the value property.
Basically a spinner shows a list of values and can do a "next" or "previous".
A spinner can be editable, the user can then type a value instead of selecting it.
If the value exists in the list, the spinner will simply jump to it.
If the value does not exist, the AddCallback is called if defined.
- If the AddCallback returns null, spinner will only refresh the current index.
- If the AddCallback returns an Integer, spinner will jump to that index (usually the index where the new value was added to the list).
'''
In the default skin you can style the text in the control using CSS like so:
[source,css]
--
.ListSpinner .value {
-fx-font-weight: bold;
}
--
The "value" class applies to the text in both readonly and editable spinners, use the "readonly" or "editable" class to style either mode specifically.
There is a left-arrow, right-arrow, up-arrow and down-arrow class that uses a SVG path to draw the arrow, this can be overridden with another SVG to draw a different shape.
The default skin has a number of styleable properies which use the text representation of an enum for their value:
[source,css]
--
.ListSpinner {
-fxx-arrow-position: {LEADING, TRAILING, SPLIT}
-fxx-arrow-direction: {VERTICAL, HORIZONTAL}
-fxx-value-alignment: see javafx.geometry.Pos (https://docs.oracle.com/javase/8/javafx/api/javafx/geometry/Pos.html)
}
--
-
Property Summary
PropertiesTypePropertyDescriptionAddCallback: this callback is called in editable mode when a value is entered that is not found in the list.javafx.beans.property.ObjectProperty
<javafx.util.Callback<ListSpinner<T>, javafx.scene.Node>> CellFactory: generate the cell to render a valuejavafx.beans.property.ObjectProperty
<Boolean> Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.javafx.beans.property.ObjectProperty
<Boolean> Editable: is the listspinner editable.javafx.beans.property.ObjectProperty
<Integer> Index: the currently show index in the list.javafx.beans.property.ObjectProperty
<javafx.collections.ObservableList<T>> Items: the list.javafx.beans.property.ObjectProperty
<javafx.event.EventHandler<ListSpinner.CycleEvent>> OnCycle: callback for when the list cycles to the other end in cyclic mode (for example to increase a year when a month ListSpinner skips from December to January)javafx.beans.property.ObjectProperty
<String> Postfix: a string to be placed after the value, this can for example be a unit like "kg"javafx.beans.property.ObjectProperty
<String> Prefix: a string to be placed before the list value, this can for example be a currencyjavafx.beans.property.ObjectProperty
<javafx.util.StringConverter<T>> StringConverter<T>: convert a value in the list to its string representation and (when in edit mode) vice versa.javafx.beans.property.ObjectProperty
<T> Value: the currently show value of the list.Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltip
Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
Properties inherited from class javafx.scene.Parent
needsLayout
Properties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
CycleEvent(package private) class
Default cell factory(package private) class
A string converter that does a simple toString, but cannot convert to an object -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javafx.beans.property.ObjectProperty
<javafx.util.Callback<ListSpinner<T>, javafx.scene.Node>> private final javafx.beans.property.ObjectProperty
<Boolean> private final javafx.beans.property.ObjectProperty
<Boolean> private final javafx.beans.property.ObjectProperty
<Integer> private final javafx.beans.property.ObjectProperty
<javafx.event.EventHandler<ListSpinner.CycleEvent>> private final javafx.beans.property.ObjectProperty
<javafx.collections.ObservableList<T>> private javafx.collections.ListChangeListener
<T> static final String
private final javafx.beans.property.ObjectProperty
<String> private final javafx.beans.property.ObjectProperty
<String> private final javafx.beans.property.ObjectProperty
<javafx.util.StringConverter<T>> private final javafx.beans.property.ObjectProperty
<T> Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Constructor Summary
ConstructorsConstructorDescriptionListSpinner
(int from, int to) ListSpinner
(int from, int to, int step) ListSpinner
(List<T> list) ListSpinner
(javafx.collections.ObservableList<T> items) ListSpinner
(javafx.collections.ObservableList<T> items, T startValue) ListSpinner
(T... list) -
Method Summary
Modifier and TypeMethodDescriptionAddCallback: this callback is called in editable mode when a value is entered that is not found in the list.javafx.beans.property.ObjectProperty
<javafx.util.Callback<ListSpinner<T>, javafx.scene.Node>> CellFactory: generate the cell to render a valueprivate void
javafx.scene.control.Skin
<?> javafx.beans.property.ObjectProperty
<Boolean> Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.void
javafx.beans.property.ObjectProperty
<Boolean> Editable: is the listspinner editable.static boolean
Does a o1.equals(o2) but also checks if o1 or o2 are null.void
fireCycleEvent
(ListSpinner.CycleDirection cycleDirection) we're cycling, fire the eventvoid
first()
Gets the value of theaddCallback
property.javafx.util.Callback
<ListSpinner<T>, javafx.scene.Node> Gets the value of thecellFactory
property.getIndex()
Gets the value of theindex
property.javafx.collections.ObservableList
<T> getItems()
Gets the value of theitems
property.javafx.event.EventHandler
<ListSpinner.CycleEvent> Gets the value of theonCycle
property.Gets the value of thepostfix
property.Gets the value of theprefix
property.javafx.util.StringConverter
<T> Gets the value of thestringConverter
property.Return the path to the CSS file so things are setup rightgetValue()
Gets the value of thevalue
property.void
javafx.beans.property.ObjectProperty
<Integer> Index: the currently show index in the list.isCyclic()
javafx.beans.property.ObjectProperty
<javafx.collections.ObservableList<T>> Items: the list.void
last()
Get the last index; if the data provide is endless, this method mail fail!javafx.beans.property.ObjectProperty
<javafx.event.EventHandler<ListSpinner.CycleEvent>> OnCycle: callback for when the list cycles to the other end in cyclic mode (for example to increase a year when a month ListSpinner skips from December to January)javafx.beans.property.ObjectProperty
<String> Postfix: a string to be placed after the value, this can for example be a unit like "kg"javafx.beans.property.ObjectProperty
<String> Prefix: a string to be placed before the list value, this can for example be a currencyvoid
setAddCallback
(javafx.util.Callback<T, Integer> value) Sets the value of theaddCallback
property.void
setCellFactory
(javafx.util.Callback<ListSpinner<T>, javafx.scene.Node> value) Sets the value of thecellFactory
property.void
Sets the value of thecyclic
property.void
setEditable
(Boolean value) Sets the value of theeditable
property.void
Sets the value of theindex
property.void
Sets the value of theitems
property.void
setOnCycle
(javafx.event.EventHandler<ListSpinner.CycleEvent> value) Sets the value of theonCycle
property.void
setPostfix
(String value) Sets the value of thepostfix
property.void
Sets the value of theprefix
property.void
setStringConverter
(javafx.util.StringConverter<T> value) Sets the value of thestringConverter
property.void
Sets the value of thevalue
property.javafx.beans.property.ObjectProperty
<javafx.util.StringConverter<T>> StringConverter<T>: convert a value in the list to its string representation and (when in edit mode) vice versa.javafx.beans.property.ObjectProperty
<T> Value: the currently show value of the list.withAddCallback
(javafx.util.Callback<T, Integer> value) withCellFactory
(javafx.util.Callback<ListSpinner<T>, javafx.scene.Node> value) withCyclic
(Boolean value) withEditable
(Boolean value) IdwithOnCycle
(javafx.event.EventHandler<ListSpinner.CycleEvent> value) withPostfix
(String value) withPrefix
(String value) withStringConverter
(javafx.util.StringConverter<T> value) Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
value
Value: the currently show value of the list.- See Also:
-
index
Index: the currently show index in the list.- See Also:
-
cyclic
Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.- See Also:
-
editable
Editable: is the listspinner editable. It allows the user to type a value instead of only navigating to it, and if the AddCallback is defined, possibly also adding values.- See Also:
-
postfix
Postfix: a string to be placed after the value, this can for example be a unit like "kg"- See Also:
-
prefix
Prefix: a string to be placed before the list value, this can for example be a currency- See Also:
-
items
Items: the list.- See Also:
-
cellFactory
public javafx.beans.property.ObjectProperty<javafx.util.Callback<ListSpinner<T>,javafx.scene.Node>> cellFactoryPropertyCellFactory: generate the cell to render a value- See Also:
-
stringConverter
StringConverter<T>: convert a value in the list to its string representation and (when in edit mode) vice versa.- See Also:
-
addCallback
AddCallback: this callback is called in editable mode when a value is entered that is not found in the list. It is up to the coder to added it to the list or not.- See Also:
-
onCycle
public javafx.beans.property.ObjectProperty<javafx.event.EventHandler<ListSpinner.CycleEvent>> onCyclePropertyOnCycle: callback for when the list cycles to the other end in cyclic mode (for example to increase a year when a month ListSpinner skips from December to January)- See Also:
-
-
Field Details
-
listChangeListener
-
valueObjectProperty
-
indexObjectProperty
-
cyclicObjectProperty
-
editableObjectProperty
-
postfixObjectProperty
-
prefixObjectProperty
-
itemsObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> itemsObjectProperty -
cellFactoryObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<ListSpinner<T>,javafx.scene.Node>> cellFactoryObjectProperty -
stringConverterObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<T>> stringConverterObjectProperty -
addCallbackObjectProperty
-
iOnCycleObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<ListSpinner.CycleEvent>> iOnCycleObjectProperty -
ONCYCLE_PROPERTY_ID
- See Also:
-
-
Constructor Details
-
ListSpinner
public ListSpinner() -
ListSpinner
- Parameters:
items
- The item list used to populate the spinner.
-
ListSpinner
- Parameters:
items
- The item list used to populate the spinner.startValue
- The initial value of the spinner (one of the items).
-
ListSpinner
- Parameters:
list
-
-
ListSpinner
- Parameters:
list
-
-
ListSpinner
public ListSpinner(int from, int to) - Parameters:
from
-to
-
-
ListSpinner
public ListSpinner(int from, int to, int step) - Parameters:
from
-to
-step
-
-
-
Method Details
-
construct
private void construct() -
getUserAgentStylesheet
Return the path to the CSS file so things are setup right- Overrides:
getUserAgentStylesheet
in classjavafx.scene.layout.Region
-
createDefaultSkin
public javafx.scene.control.Skin<?> createDefaultSkin()- Overrides:
createDefaultSkin
in classjavafx.scene.control.Control
-
withId
Id -
valueProperty
Value: the currently show value of the list.- Returns:
- the
value
property - See Also:
-
getValue
Gets the value of thevalue
property.- Property description:
- Value: the currently show value of the list.
- Returns:
- the value of the
value
property - See Also:
-
setValue
Sets the value of thevalue
property.- Property description:
- Value: the currently show value of the list.
- Parameters:
value
- the value for thevalue
property- See Also:
-
withValue
-
indexProperty
Index: the currently show index in the list.- Returns:
- the
index
property - See Also:
-
getIndex
Gets the value of theindex
property.- Property description:
- Index: the currently show index in the list.
- Returns:
- the value of the
index
property - See Also:
-
setIndex
Sets the value of theindex
property.- Property description:
- Index: the currently show index in the list.
- Parameters:
value
- the value for theindex
property- See Also:
-
withIndex
-
cyclicProperty
Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.- Returns:
- the
cyclic
property - See Also:
-
isCyclic
-
setCyclic
Sets the value of thecyclic
property.- Property description:
- Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.
- Parameters:
value
- the value for thecyclic
property- See Also:
-
withCyclic
-
editableProperty
Editable: is the listspinner editable. It allows the user to type a value instead of only navigating to it, and if the AddCallback is defined, possibly also adding values.- Returns:
- the
editable
property - See Also:
-
isEditable
-
setEditable
Sets the value of theeditable
property.- Property description:
- Editable: is the listspinner editable. It allows the user to type a value instead of only navigating to it, and if the AddCallback is defined, possibly also adding values.
- Parameters:
value
- the value for theeditable
property- See Also:
-
withEditable
-
postfixProperty
Postfix: a string to be placed after the value, this can for example be a unit like "kg"- Returns:
- the
postfix
property - See Also:
-
getPostfix
Gets the value of thepostfix
property.- Property description:
- Postfix: a string to be placed after the value, this can for example be a unit like "kg"
- Returns:
- the value of the
postfix
property - See Also:
-
setPostfix
Sets the value of thepostfix
property.- Property description:
- Postfix: a string to be placed after the value, this can for example be a unit like "kg"
- Parameters:
value
- the value for thepostfix
property- See Also:
-
withPostfix
-
prefixProperty
Prefix: a string to be placed before the list value, this can for example be a currency- Returns:
- the
prefix
property - See Also:
-
getPrefix
Gets the value of theprefix
property.- Property description:
- Prefix: a string to be placed before the list value, this can for example be a currency
- Returns:
- the value of the
prefix
property - See Also:
-
setPrefix
Sets the value of theprefix
property.- Property description:
- Prefix: a string to be placed before the list value, this can for example be a currency
- Parameters:
value
- the value for theprefix
property- See Also:
-
withPrefix
-
itemsProperty
Items: the list.- Returns:
- the
items
property - See Also:
-
getItems
Gets the value of theitems
property.- Property description:
- Items: the list.
- Returns:
- the value of the
items
property - See Also:
-
setItems
Sets the value of theitems
property.- Property description:
- Items: the list.
- Parameters:
value
- the value for theitems
property- See Also:
-
withItems
-
cellFactoryProperty
public javafx.beans.property.ObjectProperty<javafx.util.Callback<ListSpinner<T>,javafx.scene.Node>> cellFactoryProperty()CellFactory: generate the cell to render a value- Returns:
- the
cellFactory
property - See Also:
-
getCellFactory
Gets the value of thecellFactory
property.- Property description:
- CellFactory: generate the cell to render a value
- Returns:
- the value of the
cellFactory
property - See Also:
-
setCellFactory
Sets the value of thecellFactory
property.- Property description:
- CellFactory: generate the cell to render a value
- Parameters:
value
- the value for thecellFactory
property- See Also:
-
withCellFactory
-
stringConverterProperty
public javafx.beans.property.ObjectProperty<javafx.util.StringConverter<T>> stringConverterProperty()StringConverter<T>: convert a value in the list to its string representation and (when in edit mode) vice versa.- Returns:
- the
stringConverter
property - See Also:
-
getStringConverter
Gets the value of thestringConverter
property.- Property description:
- StringConverter<T>: convert a value in the list to its string representation and (when in edit mode) vice versa.
- Returns:
- the value of the
stringConverter
property - See Also:
-
setStringConverter
Sets the value of thestringConverter
property.- Property description:
- StringConverter<T>: convert a value in the list to its string representation and (when in edit mode) vice versa.
- Parameters:
value
- the value for thestringConverter
property- See Also:
-
withStringConverter
-
addCallbackProperty
AddCallback: this callback is called in editable mode when a value is entered that is not found in the list. It is up to the coder to added it to the list or not.- Returns:
- the index where of the position the ListSpinner must show or null (do nothing expect refresh the currently show index)
- See Also:
-
getAddCallback
Gets the value of theaddCallback
property.- Property description:
- AddCallback: this callback is called in editable mode when a value is entered that is not found in the list. It is up to the coder to added it to the list or not.
- Returns:
- the value of the
addCallback
property - See Also:
-
setAddCallback
Sets the value of theaddCallback
property.- Property description:
- AddCallback: this callback is called in editable mode when a value is entered that is not found in the list. It is up to the coder to added it to the list or not.
- Parameters:
value
- the value for theaddCallback
property- See Also:
-
withAddCallback
-
onCycleProperty
public javafx.beans.property.ObjectProperty<javafx.event.EventHandler<ListSpinner.CycleEvent>> onCycleProperty()OnCycle: callback for when the list cycles to the other end in cyclic mode (for example to increase a year when a month ListSpinner skips from December to January)- Returns:
- the
onCycle
property - See Also:
-
getOnCycle
Gets the value of theonCycle
property.- Property description:
- OnCycle: callback for when the list cycles to the other end in cyclic mode (for example to increase a year when a month ListSpinner skips from December to January)
- Returns:
- the value of the
onCycle
property - See Also:
-
setOnCycle
Sets the value of theonCycle
property.- Property description:
- OnCycle: callback for when the list cycles to the other end in cyclic mode (for example to increase a year when a month ListSpinner skips from December to January)
- Parameters:
value
- the value for theonCycle
property- See Also:
-
withOnCycle
-
fireCycleEvent
we're cycling, fire the event -
first
public void first() -
decrement
public void decrement() -
increment
public void increment() -
last
public void last()Get the last index; if the data provide is endless, this method mail fail! -
equals
Does a o1.equals(o2) but also checks if o1 or o2 are null.- Parameters:
o1
-o2
-- Returns:
- True if the two values are equal, false otherwise.
-