java.lang.Object
com.dua3.utility.fx.controls.SliderBuilder
A builder class for constructing a
SliderWithButtons instance with various configuration options.-
Method Summary
Modifier and TypeMethodDescriptionbind(ObservableNumberValue value) Binds the slider's value property to the specified observable number value.bindBidirectional(Property<Number> value) Binds the slider's value property bidirectionally with the specified number property.bindMax(ObservableNumberValue value) Binds the maximum value of the slider to the given observable number value.bindMin(ObservableNumberValue value) Binds the minimum value of the slider to the givenObservableNumberValue.blockIncrement(double value) Sets the block increment value for the slider.build()Builds the configuredSliderWithButtonsinstance.decrementGraphic(Node value) Sets a graphical representation for the decrement button of the slider.decrementText(String value) Sets the text for the decrement button of the slider.incrementGraphic(Node value) Sets the graphic for the increment button of the slider.incrementText(String value) Sets the text label for the increment button on the slider.max(double value) Sets the maximum value of the slider.min(double value) Sets the minimum value of the slider.onChange(DoubleConsumer onChange) Sets a callback to be invoked when the value of the slider changes.orientation(Orientation value) Sets the orientation of the slider.showTickLabels(boolean value) Configures whether to show the tick labels on the slider.showTickMarks(boolean value) Configures whether the slider should display tick marks.value(double value) Sets the value of the slider to the specified value.
-
Method Details
-
orientation
Sets the orientation of the slider.- Parameters:
value- the orientation for the slider- Returns:
- this instance of
SliderBuilderfor method chaining. - See Also:
-
min
Sets the minimum value of the slider.- Parameters:
value- the minimum value to set for the slider- Returns:
- this instance of
SliderBuilderfor method chaining.
-
max
Sets the maximum value of the slider.- Parameters:
value- the maximum value to set for the slider.- Returns:
- this instance of
SliderBuilderfor method chaining.
-
value
Sets the value of the slider to the specified value.- Parameters:
value- the value to set on the slider- Returns:
- this instance of
SliderBuilderfor method chaining.
-
incrementText
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
SliderBuilderfor method chaining.
-
incrementGraphic
Sets the graphic for the increment button of the slider.- Parameters:
value- theNodeto be used as the graphic for the increment button- Returns:
- this instance of
SliderBuilderfor method chaining.
-
decrementText
Sets the text for the decrement button of the slider.- Parameters:
value- the text to set for the decrement button- Returns:
- this instance of
SliderBuilderfor method chaining.
-
decrementGraphic
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
SliderBuilderfor method chaining.
-
blockIncrement
Sets the block increment value for the slider.- Parameters:
value- the new block increment value- Returns:
- this instance of
SliderBuilderfor method chaining.
-
showTickLabels
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
SliderBuilderfor method chaining.
-
showTickMarks
Configures whether the slider should display tick marks.- Parameters:
value- true to show tick marks, false to hide them- Returns:
- this instance of
SliderBuilderfor method chaining.
-
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
SliderBuilderfor method chaining.
-
bind
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
SliderBuilderfor method chaining.
-
bindBidirectional
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
SliderBuilderfor method chaining.
-
bindMin
Binds the minimum value of the slider to the givenObservableNumberValue.- Parameters:
value- theObservableNumberValueto bind the minimum value to- Returns:
- this instance of
SliderBuilderfor method chaining.
-
bindMax
Binds the maximum value of the slider to the given observable number value.- Parameters:
value- theObservableNumberValueto bind to the slider's maximum property- Returns:
- this instance of
SliderBuilderfor method chaining.
-
build
Builds the configuredSliderWithButtonsinstance.- Returns:
- the built
SliderWithButtonsinstance.
-