Class ListSpinner<T>
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)
}
--
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classCycleEvent(package private) classDefault cell factory(package private) classA string converter that does a simple toString, but cannot convert to an object -
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, tooltipProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties 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 -
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 Stringprivate 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_SIZEFields 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 voidjavafx.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.voidjavafx.beans.property.ObjectProperty<Boolean> Editable: is the listspinner editable.static booleanDoes a o1.equals(o2) but also checks if o1 or o2 are null.voidfireCycleEvent(ListSpinner.CycleDirection cycleDirection) we're cycling, fire the eventvoidfirst()Gets the value of theaddCallbackproperty.javafx.util.Callback<ListSpinner<T>, javafx.scene.Node> Gets the value of thecellFactoryproperty.getIndex()Gets the value of theindexproperty.javafx.collections.ObservableList<T> getItems()Gets the value of theitemsproperty.javafx.event.EventHandler<ListSpinner.CycleEvent> Gets the value of theonCycleproperty.Gets the value of thepostfixproperty.Gets the value of theprefixproperty.javafx.util.StringConverter<T> Gets the value of thestringConverterproperty.Return the path to the CSS file so things are setup rightgetValue()Gets the value of thevalueproperty.voidjavafx.beans.property.ObjectProperty<Integer> Index: the currently show index in the list.isCyclic()javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> Items: the list.voidlast()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 currencyvoidsetAddCallback(javafx.util.Callback<T, Integer> value) Sets the value of theaddCallbackproperty.voidsetCellFactory(javafx.util.Callback<ListSpinner<T>, javafx.scene.Node> value) Sets the value of thecellFactoryproperty.voidSets the value of thecyclicproperty.voidsetEditable(Boolean value) Sets the value of theeditableproperty.voidSets the value of theindexproperty.voidSets the value of theitemsproperty.voidsetOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value) Sets the value of theonCycleproperty.voidsetPostfix(String value) Sets the value of thepostfixproperty.voidSets the value of theprefixproperty.voidsetStringConverter(javafx.util.StringConverter<T> value) Sets the value of thestringConverterproperty.voidSets the value of thevalueproperty.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, tooltipPropertyMethods 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, widthPropertyMethods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, visiblePropertyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
-
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
-
ListSpinner
-
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:
getUserAgentStylesheetin classjavafx.scene.layout.Region
-
createDefaultSkin
public javafx.scene.control.Skin<?> createDefaultSkin()- Overrides:
createDefaultSkinin classjavafx.scene.control.Control
-
withId
Id -
valueProperty
Value: the currently show value of the list.- Returns:
- the
valueproperty - See Also:
-
getValue
Gets the value of thevalueproperty.- Property description:
- Value: the currently show value of the list.
- Returns:
- the value of the
valueproperty - See Also:
-
setValue
Sets the value of thevalueproperty.- Property description:
- Value: the currently show value of the list.
- Parameters:
value- the value for thevalueproperty- See Also:
-
withValue
-
indexProperty
Index: the currently show index in the list.- Returns:
- the
indexproperty - See Also:
-
getIndex
Gets the value of theindexproperty.- Property description:
- Index: the currently show index in the list.
- Returns:
- the value of the
indexproperty - See Also:
-
setIndex
Sets the value of theindexproperty.- Property description:
- Index: the currently show index in the list.
- Parameters:
value- the value for theindexproperty- See Also:
-
withIndex
-
cyclicProperty
Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.- Returns:
- the
cyclicproperty - See Also:
-
isCyclic
-
setCyclic
Sets the value of thecyclicproperty.- 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 thecyclicproperty- 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
editableproperty - See Also:
-
isEditable
-
setEditable
Sets the value of theeditableproperty.- 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 theeditableproperty- See Also:
-
withEditable
-
postfixProperty
Postfix: a string to be placed after the value, this can for example be a unit like "kg"- Returns:
- the
postfixproperty - See Also:
-
getPostfix
Gets the value of thepostfixproperty.- 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
postfixproperty - See Also:
-
setPostfix
Sets the value of thepostfixproperty.- 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 thepostfixproperty- See Also:
-
withPostfix
-
prefixProperty
Prefix: a string to be placed before the list value, this can for example be a currency- Returns:
- the
prefixproperty - See Also:
-
getPrefix
Gets the value of theprefixproperty.- Property description:
- Prefix: a string to be placed before the list value, this can for example be a currency
- Returns:
- the value of the
prefixproperty - See Also:
-
setPrefix
Sets the value of theprefixproperty.- Property description:
- Prefix: a string to be placed before the list value, this can for example be a currency
- Parameters:
value- the value for theprefixproperty- See Also:
-
withPrefix
-
itemsProperty
Items: the list.- Returns:
- the
itemsproperty - See Also:
-
getItems
Gets the value of theitemsproperty.- Property description:
- Items: the list.
- Returns:
- the value of the
itemsproperty - See Also:
-
setItems
Sets the value of theitemsproperty.- Property description:
- Items: the list.
- Parameters:
value- the value for theitemsproperty- 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
cellFactoryproperty - See Also:
-
getCellFactory
Gets the value of thecellFactoryproperty.- Property description:
- CellFactory: generate the cell to render a value
- Returns:
- the value of the
cellFactoryproperty - See Also:
-
setCellFactory
Sets the value of thecellFactoryproperty.- Property description:
- CellFactory: generate the cell to render a value
- Parameters:
value- the value for thecellFactoryproperty- See Also:
-
withCellFactory
public ListSpinner<T> withCellFactory(javafx.util.Callback<ListSpinner<T>, javafx.scene.Node> value) -
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
stringConverterproperty - See Also:
-
getStringConverter
Gets the value of thestringConverterproperty.- 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
stringConverterproperty - See Also:
-
setStringConverter
Sets the value of thestringConverterproperty.- 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 thestringConverterproperty- 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 theaddCallbackproperty.- 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
addCallbackproperty - See Also:
-
setAddCallback
Sets the value of theaddCallbackproperty.- 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 theaddCallbackproperty- 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
onCycleproperty - See Also:
-
getOnCycle
Gets the value of theonCycleproperty.- 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
onCycleproperty - See Also:
-
setOnCycle
Sets the value of theonCycleproperty.- 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 theonCycleproperty- 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
-