Class SliderWithButtons

All Implemented Interfaces:
Styleable, EventTarget

public class SliderWithButtons extends Region
A custom UI component that combines a slider with increment and decrement buttons. It supports various display modes, which can include a value label and text input field.
  • Property Details

  • Method Details

    • getMax

      public double getMax()
      Retrieves the maximum value of the slider.
      Returns:
      the maximum value that the slider can represent.
    • setMax

      public void setMax(double value)
      Sets the maximum value for the slider.
      Parameters:
      value - the maximum value to set on the slider.
    • getValue

      public double getValue()
      Retrieves the current value of the slider.
      Returns:
      The current value of the slider as a double.
    • setValue

      public void setValue(double value)
      Sets the value of the slider.
      Parameters:
      value - the value to set for the slider
    • setOrientation

      public void setOrientation(Orientation orientation)
      Sets the orientation of the slider.
      Parameters:
      orientation - the Orientation to set for the slider
      See Also:
    • getMode

      public SliderWithButtons.Mode getMode()
      Retrieves the operation mode of the slider.
      Returns:
      the current mode in which the slider is operating.
      See Also:
    • setDecrementText

      public void setDecrementText(String value)
      Sets the text of the decrement button in the slider.
      Parameters:
      value - the text to be displayed on the decrement button
    • setDecrementGraphic

      public void setDecrementGraphic(Node value)
      Sets the graphical representation for the decrement button of the slider.
      Parameters:
      value - the Node to be used as the graphic for the decrement button
    • setIncrementText

      public void setIncrementText(String value)
      Sets the text label for the increment button on the slider.
      Parameters:
      value - the text to set on the increment button
    • setIncrementGraphic

      public void setIncrementGraphic(Node value)
      Sets the graphic for the increment button on the slider.
      Parameters:
      value - the Node to be used as the graphic for the increment button
    • setShowTickLabels

      public void setShowTickLabels(boolean value)
      Configures whether to show the tick labels on the slider.
      Parameters:
      value - true to show tick labels, false to hide them
    • setShowTickMarks

      public void setShowTickMarks(boolean value)
      Configures whether the slider should display tick marks.
      Parameters:
      value - true to show tick marks, false to hide them
    • getMin

      public double getMin()
      Retrieves the minimum value of the slider.
      Returns:
      the minimum value that the slider can represent.
    • setMin

      public void setMin(double value)
      Sets the minimum value for the slider.
      Parameters:
      value - the minimum value to set for the slider.
    • getMajorTickUnit

      public double getMajorTickUnit()
      Retrieves the major tick unit for the slider.
      Returns:
      the major tick unit value of the slider as a double.
    • getMinorTickCount

      public double getMinorTickCount()
      Retrieves the number of minor tick marks to be displayed on the slider.
      Returns:
      the number of minor tick marks as a double.
    • getBlockIncrement

      public double getBlockIncrement()
      Retrieves the block increment value of the slider.
      Returns:
      The block increment value of the slider as a double.
    • setBlockIncrement

      public void setBlockIncrement(double value)
      Sets the block increment value for the slider. The block increment is the amount the slider's value will change when the user interacts with the slider track (for instance, when using keyboard arrow keys).
      Parameters:
      value - the new block increment value for the slider
    • valueProperty

      public DoubleProperty valueProperty()
      Gets the value property of the slider.
      See Also:
    • minProperty

      public DoubleProperty minProperty()
      Retrieves the minimum value property of the slider.
      See Also:
    • maxProperty

      public DoubleProperty maxProperty()
      Returns the DoubleProperty representing the maximum value of the slider.
      See Also:
    • majorTickUnitProperty

      public DoubleProperty majorTickUnitProperty()
      Retrieves the major tick unit property of the slider.
      See Also:
    • minorTickCountProperty

      public IntegerProperty minorTickCountProperty()
      Retrieves the property for the minor tick count of the slider.
      See Also:
    • valueChangingProperty

      public BooleanProperty valueChangingProperty()
      Retrieves the value changing property of the slider.
    • labelFormatterProperty

      public ObjectProperty<StringConverter<Double>> labelFormatterProperty()
      Returns the label formatter property of the slider. This property allows for a custom string converter to format the labels of the slider.
    • showTickLabelsProperty

      public BooleanProperty showTickLabelsProperty()
      Retrieves the property for showing or hiding tick labels on the slider.
      See Also:
    • showTickMarksProperty

      public BooleanProperty showTickMarksProperty()
      Retrieves the property representing whether tick marks are shown on the slider.
      See Also:
    • snapToTicksProperty

      public BooleanProperty snapToTicksProperty()
      Represents the property that indicates whether the slider will snap to the closest tick mark.