.ListSpinner .value {
-fx-font-weight: bold;
}
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:
.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:
.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)
}
Type | Property and Description |
---|---|
javafx.beans.property.ObjectProperty<javafx.util.Callback<T,java.lang.Integer>> |
addCallback
AddCallback: 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
CellFactory: generate the cell to render a value
|
javafx.beans.property.ObjectProperty<java.lang.Boolean> |
cyclic
Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.
|
javafx.beans.property.ObjectProperty<java.lang.Boolean> |
editable
Editable: is the listspinner editable.
|
javafx.beans.property.ObjectProperty<java.lang.Integer> |
index
Index: the currently show index in the list.
|
javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> |
items
Items: the list.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<ListSpinner.CycleEvent>> |
onCycle
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<java.lang.String> |
postfix
Postfix: a string to be placed after the value, this can for example be a unit like "kg"
|
javafx.beans.property.ObjectProperty<java.lang.String> |
prefix
Prefix: a string to be placed before the list value, this can for example be a currency
|
javafx.beans.property.ObjectProperty<javafx.util.StringConverter<T>> |
stringConverter
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
Value: the currently show value of the list.
|
contextMenuProperty, skinClassNameProperty, skinProperty, tooltipProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthProperty
impl_traversalEngineProperty, needsLayoutProperty
blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, 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, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Modifier and Type | Class and Description |
---|---|
static class |
ListSpinner.CycleDirection |
static class |
ListSpinner.CycleEvent
CycleEvent
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ONCYCLE_PROPERTY_ID |
Constructor and Description |
---|
ListSpinner() |
ListSpinner(int from,
int to) |
ListSpinner(int from,
int to,
int step) |
ListSpinner(java.util.List<T> list) |
ListSpinner(javafx.collections.ObservableList<T> items) |
ListSpinner(javafx.collections.ObservableList<T> items,
T startValue) |
ListSpinner(T... list) |
Modifier and Type | Method and Description |
---|---|
javafx.beans.property.ObjectProperty<javafx.util.Callback<T,java.lang.Integer>> |
addCallbackProperty()
AddCallback: 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>> |
cellFactoryProperty()
CellFactory: generate the cell to render a value
|
javafx.scene.control.Skin<?> |
createDefaultSkin() |
javafx.beans.property.ObjectProperty<java.lang.Boolean> |
cyclicProperty()
Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.
|
void |
decrement() |
javafx.beans.property.ObjectProperty<java.lang.Boolean> |
editableProperty()
Editable: is the listspinner editable.
|
static boolean |
equals(java.lang.Object o1,
java.lang.Object o2)
Does a o1.equals(o2) but also checks if o1 or o2 are null.
|
void |
fireCycleEvent(ListSpinner.CycleDirection cycleDirection)
we’re cycling, fire the event
|
void |
first() |
javafx.util.Callback<T,java.lang.Integer> |
getAddCallback() |
javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> |
getCellFactory() |
java.lang.Integer |
getIndex() |
javafx.collections.ObservableList<T> |
getItems() |
javafx.event.EventHandler<ListSpinner.CycleEvent> |
getOnCycle() |
java.lang.String |
getPostfix() |
java.lang.String |
getPrefix() |
javafx.util.StringConverter<T> |
getStringConverter() |
java.lang.String |
getUserAgentStylesheet()
Return the path to the CSS file so things are setup right
|
T |
getValue() |
void |
increment() |
javafx.beans.property.ObjectProperty<java.lang.Integer> |
indexProperty()
Index: the currently show index in the list.
|
java.lang.Boolean |
isCyclic() |
java.lang.Boolean |
isEditable() |
javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> |
itemsProperty()
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>> |
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)
|
javafx.beans.property.ObjectProperty<java.lang.String> |
postfixProperty()
Postfix: a string to be placed after the value, this can for example be a unit like "kg"
|
javafx.beans.property.ObjectProperty<java.lang.String> |
prefixProperty()
Prefix: a string to be placed before the list value, this can for example be a currency
|
void |
setAddCallback(javafx.util.Callback<T,java.lang.Integer> value) |
void |
setCellFactory(javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> value) |
void |
setCyclic(java.lang.Boolean value) |
void |
setEditable(java.lang.Boolean value) |
void |
setIndex(java.lang.Integer value) |
void |
setItems(javafx.collections.ObservableList<T> value) |
void |
setOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value) |
void |
setPostfix(java.lang.String value) |
void |
setPrefix(java.lang.String value) |
void |
setStringConverter(javafx.util.StringConverter<T> value) |
void |
setValue(T value) |
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.
|
javafx.beans.property.ObjectProperty<T> |
valueProperty()
Value: the currently show value of the list.
|
ListSpinner<T> |
withAddCallback(javafx.util.Callback<T,java.lang.Integer> value) |
ListSpinner<T> |
withCellFactory(javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> value) |
ListSpinner<T> |
withCyclic(java.lang.Boolean value) |
ListSpinner<T> |
withEditable(java.lang.Boolean value) |
ListSpinner<T> |
withId(java.lang.String value)
Id
|
ListSpinner<T> |
withIndex(java.lang.Integer value) |
ListSpinner<T> |
withItems(javafx.collections.ObservableList<T> value) |
ListSpinner<T> |
withOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value) |
ListSpinner<T> |
withPostfix(java.lang.String value) |
ListSpinner<T> |
withPrefix(java.lang.String value) |
ListSpinner<T> |
withStringConverter(javafx.util.StringConverter<T> value) |
ListSpinner<T> |
withValue(T value) |
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getSkin, getTooltip, impl_cssGetFocusTraversableInitialValue, impl_processCSS, isResizable, layoutChildren, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, 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, snapSize, snapSpace, snapToPixelProperty, widthProperty
getChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBounds
addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, 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, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_geomChanged, impl_getAccessible, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, 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, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, 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, screenToLocal, screenToLocal, screenToLocal, 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, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
public javafx.beans.property.ObjectProperty<T> valueProperty
Value: the currently show value of the list.
getValue()
,
setValue(T)
public javafx.beans.property.ObjectProperty<java.lang.Integer> indexProperty
Index: the currently show index in the list.
getIndex()
,
setIndex(Integer)
public javafx.beans.property.ObjectProperty<java.lang.Boolean> cyclicProperty
Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.
setCyclic(Boolean)
public javafx.beans.property.ObjectProperty<java.lang.Boolean> 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.
setEditable(Boolean)
public javafx.beans.property.ObjectProperty<java.lang.String> postfixProperty
Postfix: a string to be placed after the value, this can for example be a unit like "kg"
getPostfix()
,
setPostfix(String)
public javafx.beans.property.ObjectProperty<java.lang.String> prefixProperty
Prefix: a string to be placed before the list value, this can for example be a currency
getPrefix()
,
setPrefix(String)
public javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> itemsProperty
Items: the list.
getItems()
,
setItems(ObservableList)
public javafx.beans.property.ObjectProperty<javafx.util.Callback<ListSpinner<T>,javafx.scene.Node>> cellFactoryProperty
CellFactory: generate the cell to render a value
getCellFactory()
,
setCellFactory(Callback)
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.
public javafx.beans.property.ObjectProperty<javafx.util.Callback<T,java.lang.Integer>> 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.
getAddCallback()
,
setAddCallback(Callback)
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)
getOnCycle()
,
setOnCycle(EventHandler)
public static final java.lang.String ONCYCLE_PROPERTY_ID
public ListSpinner()
public ListSpinner(javafx.collections.ObservableList<T> items)
items
- The item list used to populate the spinner.public ListSpinner(javafx.collections.ObservableList<T> items, T startValue)
items
- The item list used to populate the spinner.startValue
- The initial value of the spinner (one of the items).public ListSpinner(java.util.List<T> list)
list
- public ListSpinner(T... list)
list
- public ListSpinner(int from, int to)
from
- to
- public ListSpinner(int from, int to, int step)
from
- to
- step
- public java.lang.String getUserAgentStylesheet()
Return the path to the CSS file so things are setup right
getUserAgentStylesheet
in class javafx.scene.control.Control
public javafx.scene.control.Skin<?> createDefaultSkin()
createDefaultSkin
in class javafx.scene.control.Control
public ListSpinner<T> withId(java.lang.String value)
Id
public javafx.beans.property.ObjectProperty<T> valueProperty()
Value: the currently show value of the list.
getValue()
,
setValue(T)
public T getValue()
public void setValue(T value)
public ListSpinner<T> withValue(T value)
public javafx.beans.property.ObjectProperty<java.lang.Integer> indexProperty()
Index: the currently show index in the list.
getIndex()
,
setIndex(Integer)
public java.lang.Integer getIndex()
public void setIndex(java.lang.Integer value)
public ListSpinner<T> withIndex(java.lang.Integer value)
public javafx.beans.property.ObjectProperty<java.lang.Boolean> cyclicProperty()
Cyclic: what happens at the beginning or end of the list, stop or cycle to the other end.
setCyclic(Boolean)
public java.lang.Boolean isCyclic()
public void setCyclic(java.lang.Boolean value)
public ListSpinner<T> withCyclic(java.lang.Boolean value)
public javafx.beans.property.ObjectProperty<java.lang.Boolean> 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.
setEditable(Boolean)
public java.lang.Boolean isEditable()
public void setEditable(java.lang.Boolean value)
public ListSpinner<T> withEditable(java.lang.Boolean value)
public javafx.beans.property.ObjectProperty<java.lang.String> postfixProperty()
Postfix: a string to be placed after the value, this can for example be a unit like "kg"
getPostfix()
,
setPostfix(String)
public java.lang.String getPostfix()
public void setPostfix(java.lang.String value)
public ListSpinner<T> withPostfix(java.lang.String value)
public javafx.beans.property.ObjectProperty<java.lang.String> prefixProperty()
Prefix: a string to be placed before the list value, this can for example be a currency
getPrefix()
,
setPrefix(String)
public java.lang.String getPrefix()
public void setPrefix(java.lang.String value)
public ListSpinner<T> withPrefix(java.lang.String value)
public javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> itemsProperty()
Items: the list.
getItems()
,
setItems(ObservableList)
public javafx.collections.ObservableList<T> getItems()
public void setItems(javafx.collections.ObservableList<T> value)
public ListSpinner<T> withItems(javafx.collections.ObservableList<T> value)
public javafx.beans.property.ObjectProperty<javafx.util.Callback<ListSpinner<T>,javafx.scene.Node>> cellFactoryProperty()
CellFactory: generate the cell to render a value
getCellFactory()
,
setCellFactory(Callback)
public javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> getCellFactory()
public void setCellFactory(javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> value)
public ListSpinner<T> withCellFactory(javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> value)
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.
public javafx.util.StringConverter<T> getStringConverter()
public void setStringConverter(javafx.util.StringConverter<T> value)
public ListSpinner<T> withStringConverter(javafx.util.StringConverter<T> value)
public javafx.beans.property.ObjectProperty<javafx.util.Callback<T,java.lang.Integer>> 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.
getAddCallback()
,
setAddCallback(Callback)
public javafx.util.Callback<T,java.lang.Integer> getAddCallback()
public void setAddCallback(javafx.util.Callback<T,java.lang.Integer> value)
public ListSpinner<T> withAddCallback(javafx.util.Callback<T,java.lang.Integer> value)
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)
getOnCycle()
,
setOnCycle(EventHandler)
public javafx.event.EventHandler<ListSpinner.CycleEvent> getOnCycle()
public void setOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value)
public ListSpinner<T> withOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value)
public void fireCycleEvent(ListSpinner.CycleDirection cycleDirection)
we’re cycling, fire the event
public void first()
public void decrement()
public void increment()
public void last()
Get the last index; if the data provide is endless, this method mail fail!
public static boolean equals(java.lang.Object o1, java.lang.Object o2)
Does a o1.equals(o2) but also checks if o1 or o2 are null.
o1
- o2
-