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) } --
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.ObjectProperty<javafx.util.Callback<T,Integer>>
    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: generate the cell to render a value
    javafx.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 currency
    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.

    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 Classes
    Modifier and Type
    Class
    Description
    static 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

    Fields
    Modifier and Type
    Field
    Description
    private final javafx.beans.property.ObjectProperty<javafx.util.Callback<T,Integer>>
     
    private 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

    Constructors
    Constructor
    Description
     
    ListSpinner(int from, int to)
     
    ListSpinner(int from, int to, int step)
     
     
    ListSpinner(javafx.collections.ObservableList<T> items)
     
    ListSpinner(javafx.collections.ObservableList<T> items, T startValue)
     
    ListSpinner(T... list)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.beans.property.ObjectProperty<javafx.util.Callback<T,Integer>>
    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: generate the cell to render a value
    private 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
    equals(Object o1, Object o2)
    Does a o1.equals(o2) but also checks if o1 or o2 are null.
    void
    we're cycling, fire the event
    void
     
    javafx.util.Callback<T,Integer>
    Gets the value of the addCallback property.
    javafx.util.Callback<ListSpinner<T>,javafx.scene.Node>
    Gets the value of the cellFactory property.
    Gets the value of the index property.
    javafx.collections.ObservableList<T>
    Gets the value of the items property.
    javafx.event.EventHandler<ListSpinner.CycleEvent>
    Gets the value of the onCycle property.
    Gets the value of the postfix property.
    Gets the value of the prefix property.
    javafx.util.StringConverter<T>
    Gets the value of the stringConverter property.
    Return the path to the CSS file so things are setup right
    Gets the value of the value property.
    void
     
    javafx.beans.property.ObjectProperty<Integer>
    Index: the currently show index in the list.
     
     
    javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>>
    Items: the list.
    void
    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 currency
    void
    setAddCallback(javafx.util.Callback<T,Integer> value)
    Sets the value of the addCallback property.
    void
    setCellFactory(javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> value)
    Sets the value of the cellFactory property.
    void
    Sets the value of the cyclic property.
    void
    Sets the value of the editable property.
    void
    Sets the value of the index property.
    void
    setItems(javafx.collections.ObservableList<T> value)
    Sets the value of the items property.
    void
    setOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value)
    Sets the value of the onCycle property.
    void
    Sets the value of the postfix property.
    void
    Sets the value of the prefix property.
    void
    setStringConverter(javafx.util.StringConverter<T> value)
    Sets the value of the stringConverter property.
    void
    setValue(T value)
    Sets the value of the value 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)
     
     
     
    withId(String value)
    Id
     
    withItems(javafx.collections.ObservableList<T> value)
     
    withOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value)
     
     
     
    withStringConverter(javafx.util.StringConverter<T> value)
     
    withValue(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

  • Field Details

    • listChangeListener

      private javafx.collections.ListChangeListener<T> listChangeListener
    • valueObjectProperty

      private final javafx.beans.property.ObjectProperty<T> valueObjectProperty
    • indexObjectProperty

      private final javafx.beans.property.ObjectProperty<Integer> indexObjectProperty
    • cyclicObjectProperty

      private final javafx.beans.property.ObjectProperty<Boolean> cyclicObjectProperty
    • editableObjectProperty

      private final javafx.beans.property.ObjectProperty<Boolean> editableObjectProperty
    • postfixObjectProperty

      private final javafx.beans.property.ObjectProperty<String> postfixObjectProperty
    • prefixObjectProperty

      private final javafx.beans.property.ObjectProperty<String> 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

      private final javafx.beans.property.ObjectProperty<javafx.util.Callback<T,Integer>> addCallbackObjectProperty
    • iOnCycleObjectProperty

      private final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<ListSpinner.CycleEvent>> iOnCycleObjectProperty
    • ONCYCLE_PROPERTY_ID

      public static final String ONCYCLE_PROPERTY_ID
      See Also:
  • Constructor Details

    • ListSpinner

      public ListSpinner()
    • ListSpinner

      public ListSpinner(javafx.collections.ObservableList<T> items)
      Parameters:
      items - The item list used to populate the spinner.
    • ListSpinner

      public ListSpinner(javafx.collections.ObservableList<T> items, T startValue)
      Parameters:
      items - The item list used to populate the spinner.
      startValue - The initial value of the spinner (one of the items).
    • ListSpinner

      public ListSpinner(List<T> list)
      Parameters:
      list -
    • ListSpinner

      public ListSpinner(T... list)
      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

      public String getUserAgentStylesheet()
      Return the path to the CSS file so things are setup right
      Overrides:
      getUserAgentStylesheet in class javafx.scene.layout.Region
    • createDefaultSkin

      public javafx.scene.control.Skin<?> createDefaultSkin()
      Overrides:
      createDefaultSkin in class javafx.scene.control.Control
    • withId

      public ListSpinner<T> withId(String value)
      Id
    • valueProperty

      public javafx.beans.property.ObjectProperty<T> valueProperty()
      Value: the currently show value of the list.
      Returns:
      the value property
      See Also:
    • getValue

      public T getValue()
      Gets the value of the value property.
      Property description:
      Value: the currently show value of the list.
      Returns:
      the value of the value property
      See Also:
    • setValue

      public void setValue(T value)
      Sets the value of the value property.
      Property description:
      Value: the currently show value of the list.
      Parameters:
      value - the value for the value property
      See Also:
    • withValue

      public ListSpinner<T> withValue(T value)
    • indexProperty

      public javafx.beans.property.ObjectProperty<Integer> indexProperty()
      Index: the currently show index in the list.
      Returns:
      the index property
      See Also:
    • getIndex

      public Integer getIndex()
      Gets the value of the index property.
      Property description:
      Index: the currently show index in the list.
      Returns:
      the value of the index property
      See Also:
    • setIndex

      public void setIndex(Integer value)
      Sets the value of the index property.
      Property description:
      Index: the currently show index in the list.
      Parameters:
      value - the value for the index property
      See Also:
    • withIndex

      public ListSpinner<T> withIndex(Integer value)
    • cyclicProperty

      public javafx.beans.property.ObjectProperty<Boolean> 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

      public Boolean isCyclic()
    • setCyclic

      public void setCyclic(Boolean value)
      Sets the value of the cyclic 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 the cyclic property
      See Also:
    • withCyclic

      public ListSpinner<T> withCyclic(Boolean value)
    • editableProperty

      public javafx.beans.property.ObjectProperty<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.
      Returns:
      the editable property
      See Also:
    • isEditable

      public Boolean isEditable()
    • setEditable

      public void setEditable(Boolean value)
      Sets the value of the editable 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 the editable property
      See Also:
    • withEditable

      public ListSpinner<T> withEditable(Boolean value)
    • postfixProperty

      public javafx.beans.property.ObjectProperty<String> 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

      public String getPostfix()
      Gets the value of the postfix 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

      public void setPostfix(String value)
      Sets the value of the postfix 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 the postfix property
      See Also:
    • withPostfix

      public ListSpinner<T> withPostfix(String value)
    • prefixProperty

      public javafx.beans.property.ObjectProperty<String> 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

      public String getPrefix()
      Gets the value of the prefix 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

      public void setPrefix(String value)
      Sets the value of the prefix 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 the prefix property
      See Also:
    • withPrefix

      public ListSpinner<T> withPrefix(String value)
    • itemsProperty

      public javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> itemsProperty()
      Items: the list.
      Returns:
      the items property
      See Also:
    • getItems

      public javafx.collections.ObservableList<T> getItems()
      Gets the value of the items property.
      Property description:
      Items: the list.
      Returns:
      the value of the items property
      See Also:
    • setItems

      public void setItems(javafx.collections.ObservableList<T> value)
      Sets the value of the items property.
      Property description:
      Items: the list.
      Parameters:
      value - the value for the items property
      See Also:
    • withItems

      public ListSpinner<T> withItems(javafx.collections.ObservableList<T> value)
    • 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

      public javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> getCellFactory()
      Gets the value of the cellFactory property.
      Property description:
      CellFactory: generate the cell to render a value
      Returns:
      the value of the cellFactory property
      See Also:
    • setCellFactory

      public void setCellFactory(javafx.util.Callback<ListSpinner<T>,javafx.scene.Node> value)
      Sets the value of the cellFactory property.
      Property description:
      CellFactory: generate the cell to render a value
      Parameters:
      value - the value for the cellFactory property
      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 stringConverter property
      See Also:
    • getStringConverter

      public javafx.util.StringConverter<T> getStringConverter()
      Gets the value of the stringConverter 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

      public void setStringConverter(javafx.util.StringConverter<T> value)
      Sets the value of the stringConverter 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 the stringConverter property
      See Also:
    • withStringConverter

      public ListSpinner<T> withStringConverter(javafx.util.StringConverter<T> value)
    • addCallbackProperty

      public javafx.beans.property.ObjectProperty<javafx.util.Callback<T,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.
      Returns:
      the index where of the position the ListSpinner must show or null (do nothing expect refresh the currently show index)
      See Also:
    • getAddCallback

      public javafx.util.Callback<T,Integer> getAddCallback()
      Gets the value of the addCallback 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

      public void setAddCallback(javafx.util.Callback<T,Integer> value)
      Sets the value of the addCallback 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 the addCallback property
      See Also:
    • withAddCallback

      public ListSpinner<T> withAddCallback(javafx.util.Callback<T,Integer> value)
    • 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

      public javafx.event.EventHandler<ListSpinner.CycleEvent> getOnCycle()
      Gets the value of the onCycle 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

      public void setOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value)
      Sets the value of the onCycle 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 the onCycle property
      See Also:
    • withOnCycle

      public ListSpinner<T> withOnCycle(javafx.event.EventHandler<ListSpinner.CycleEvent> value)
    • fireCycleEvent

      public void fireCycleEvent(ListSpinner.CycleDirection cycleDirection)
      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

      public static boolean equals(Object o1, Object o2)
      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.