Class SliderBuilder

java.lang.Object
com.dua3.utility.fx.controls.SliderBuilder

public class SliderBuilder extends Object
A builder class for constructing a SliderWithButtons instance with various configuration options.
  • Method Details

    • orientation

      public SliderBuilder orientation(Orientation value)
      Sets the orientation of the slider.
      Parameters:
      value - the orientation for the slider
      Returns:
      this instance of SliderBuilder for method chaining.
      See Also:
    • min

      public SliderBuilder min(double value)
      Sets the minimum value of the slider.
      Parameters:
      value - the minimum value to set for the slider
      Returns:
      this instance of SliderBuilder for method chaining.
    • max

      public SliderBuilder max(double value)
      Sets the maximum value of the slider.
      Parameters:
      value - the maximum value to set for the slider.
      Returns:
      this instance of SliderBuilder for method chaining.
    • value

      public SliderBuilder value(double value)
      Sets the value of the slider to the specified value.
      Parameters:
      value - the value to set on the slider
      Returns:
      this instance of SliderBuilder for method chaining.
    • incrementText

      public SliderBuilder incrementText(String value)
      Sets the text label for the increment button on the slider.
      Parameters:
      value - the text to set on the increment button
      Returns:
      this instance of SliderBuilder for method chaining.
    • incrementGraphic

      public SliderBuilder incrementGraphic(Node value)
      Sets the graphic for the increment button of the slider.
      Parameters:
      value - the Node to be used as the graphic for the increment button
      Returns:
      this instance of SliderBuilder for method chaining.
    • decrementText

      public SliderBuilder decrementText(String value)
      Sets the text for the decrement button of the slider.
      Parameters:
      value - the text to set for the decrement button
      Returns:
      this instance of SliderBuilder for method chaining.
    • decrementGraphic

      public SliderBuilder decrementGraphic(Node value)
      Sets a graphical representation for the decrement button of the slider.
      Parameters:
      value - the Node to be used as the graphic for the decrement button
      Returns:
      this instance of SliderBuilder for method chaining.
    • blockIncrement

      public SliderBuilder blockIncrement(double value)
      Sets the block increment value for the slider.
      Parameters:
      value - the new block increment value
      Returns:
      this instance of SliderBuilder for method chaining.
    • showTickLabels

      public SliderBuilder showTickLabels(boolean value)
      Configures whether to show the tick labels on the slider.
      Parameters:
      value - true to show tick labels, false to hide them.
      Returns:
      this instance of SliderBuilder for method chaining.
    • showTickMarks

      public SliderBuilder showTickMarks(boolean value)
      Configures whether the slider should display tick marks.
      Parameters:
      value - true to show tick marks, false to hide them
      Returns:
      this instance of SliderBuilder for method chaining.
    • onChange

      public SliderBuilder onChange(DoubleConsumer onChange)
      Sets a callback to be invoked when the value of the slider changes.
      Parameters:
      onChange - a DoubleConsumer that will be invoked with the new slider value whenever it changes
      Returns:
      this instance of SliderBuilder for method chaining.
    • bind

      public SliderBuilder bind(ObservableNumberValue value)
      Binds the slider's value property to the specified observable number value.
      Parameters:
      value - the observable number value to which the slider's value property should be bound
      Returns:
      this instance of SliderBuilder for method chaining.
    • bindBidirectional

      public SliderBuilder bindBidirectional(Property<Number> value)
      Binds the slider's value property bidirectionally with the specified number property.
      Parameters:
      value - the property to be bound bidirectionally with the slider's value property.
      Returns:
      this instance of SliderBuilder for method chaining.
    • bindMin

      public SliderBuilder bindMin(ObservableNumberValue value)
      Binds the minimum value of the slider to the given ObservableNumberValue.
      Parameters:
      value - the ObservableNumberValue to bind the minimum value to
      Returns:
      this instance of SliderBuilder for method chaining.
    • bindMax

      public SliderBuilder bindMax(ObservableNumberValue value)
      Binds the maximum value of the slider to the given observable number value.
      Parameters:
      value - the ObservableNumberValue to bind to the slider's maximum property
      Returns:
      this instance of SliderBuilder for method chaining.
    • build

      public SliderWithButtons build()
      Builds the configured SliderWithButtons instance.
      Returns:
      the built SliderWithButtons instance.