Class ListSpinnerSkin<T>

java.lang.Object
javafx.scene.control.SkinBase<ListSpinner<T>>
jfxtras.internal.scene.control.skin.ListSpinnerSkin<T>
All Implemented Interfaces:
javafx.scene.control.Skin<ListSpinner<T>>

public class ListSpinnerSkin<T> extends javafx.scene.control.SkinBase<ListSpinner<T>>
  • Property Details

  • Field Details

    • arrowPosition

      private javafx.beans.property.ObjectProperty<ListSpinnerSkin.ArrowPosition> arrowPosition
    • arrowDirection

      private javafx.beans.property.ObjectProperty<ListSpinnerSkin.ArrowDirection> arrowDirection
    • valueAlignment

      private javafx.beans.property.ObjectProperty<javafx.geometry.Pos> valueAlignment
    • decrementArrow

      private javafx.scene.layout.Region decrementArrow
    • incrementArrow

      private javafx.scene.layout.Region incrementArrow
    • skinNode

      private javafx.scene.layout.BorderPane skinNode
    • valueHolderNode

      private javafx.scene.layout.BorderPane valueHolderNode
    • unclickTimer

      private final Timer unclickTimer
    • repeatDecrementClickTimer

      private final Timer repeatDecrementClickTimer
    • repeatIncrementClickTimer

      private final Timer repeatIncrementClickTimer
    • textField

      private javafx.scene.control.TextField textField
  • Constructor Details

    • ListSpinnerSkin

      public ListSpinnerSkin(ListSpinner<T> control)
  • Method Details

    • construct

      private void construct()
    • refreshValue

      private void refreshValue()
    • arrowPositionProperty

      public final javafx.beans.property.ObjectProperty<ListSpinnerSkin.ArrowPosition> arrowPositionProperty()
      arrowPosition
      See Also:
    • setArrowPosition

      public final void setArrowPosition(ListSpinnerSkin.ArrowPosition value)
      Sets the value of the property arrowPosition.
      Property description:
      arrowPosition
    • getArrowPosition

      public final ListSpinnerSkin.ArrowPosition getArrowPosition()
      Gets the value of the property arrowPosition.
      Property description:
      arrowPosition
    • withArrowPosition

      public final ListSpinnerSkin<T> withArrowPosition(ListSpinnerSkin.ArrowPosition value)
    • arrowDirectionProperty

      public final javafx.beans.property.ObjectProperty<ListSpinnerSkin.ArrowDirection> arrowDirectionProperty()
      arrowDirection
      See Also:
    • setArrowDirection

      public final void setArrowDirection(ListSpinnerSkin.ArrowDirection value)
      Sets the value of the property arrowDirection.
      Property description:
      arrowDirection
    • getArrowDirection

      public final ListSpinnerSkin.ArrowDirection getArrowDirection()
      Gets the value of the property arrowDirection.
      Property description:
      arrowDirection
    • withArrowDirection

      public final ListSpinnerSkin<T> withArrowDirection(ListSpinnerSkin.ArrowDirection value)
    • valueAlignmentProperty

      public final javafx.beans.property.ObjectProperty<javafx.geometry.Pos> valueAlignmentProperty()
      valueAlignment
      See Also:
    • setValueAlignment

      public final void setValueAlignment(javafx.geometry.Pos value)
      Sets the value of the property valueAlignment.
      Property description:
      valueAlignment
    • getValueAlignment

      public final javafx.geometry.Pos getValueAlignment()
      Gets the value of the property valueAlignment.
      Property description:
      valueAlignment
    • withValueAlignment

      public final ListSpinnerSkin<T> withValueAlignment(javafx.geometry.Pos value)
    • getClassCssMetaData

      public static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getClassCssMetaData()
      Returns:
      The CssMetaData associated with this class, which may include the CssMetaData of its super classes.
    • getCssMetaData

      public List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getCssMetaData()
      This method should delegate to Node.getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.
      Overrides:
      getCssMetaData in class javafx.scene.control.SkinBase<ListSpinner<T>>
      Returns:
      The CssMetaData associated with this node, which may include the CssMetaData of its super classes.
    • createNodes

      private void createNodes()
      Construct the nodes. Spinner uses a GridPane where the arrows and the node for the value are laid out according to the arrows direction and location. A place holder in inserted into the GridPane to hold the value node, so the spinner can alternate between editable or readonly mode, without having to recreate the GridPane.
    • mouseEventOverArrow

      private boolean mouseEventOverArrow(javafx.scene.input.MouseEvent evt, javafx.scene.layout.Region region)
      Check if the mouse event is considered to have happened over the arrow
      Parameters:
      evt -
      region -
      Returns:
    • unclickArrows

      private void unclickArrows()
      Remove clicked CSS styling from the arrows
    • replaceValueNode

      private void replaceValueNode()
      Put the correct node for the value's place holder: - either the TextField when in editable mode, - or a node generated by the cell factory when in readonly mode.
    • alignValue

      private void alignValue()
      align the value inside the plave holder
    • parse

      protected void parse(javafx.scene.control.TextField textField)
      Parse the contents of the textfield
      Parameters:
      textField -
    • layout

      private void layout()
      Lays out the spinner, depending on the location and direction of the arrows.
    • setArrowCSS

      private void setArrowCSS()
      Set the CSS according to the direction of the arrows, so the correct arrows are shown
    • parse

      public void parse(String text)
      Parse the value (which usually comes from the TextField in the skin). If the value exists in the current items, select it. If not and a callback is defined, call the callback to have it handle it. Otherwise do nothing (leave it to the skin).