java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
com.dua3.utility.fx.controls.SliderWithButtons
- All Implemented Interfaces:
Styleable,EventTarget
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 Summary
PropertiesTypePropertyDescriptionReturns the label formatter property of the slider.Retrieves the major tick unit property of the slider.Returns the DoubleProperty representing the maximum value of the slider.Retrieves the property for the minor tick count of the slider.Retrieves the minimum value property of the slider.Retrieves the property for showing or hiding tick labels on the slider.Retrieves the property representing whether tick marks are shown on the slider.Represents the property that indicates whether the slider will snap to the closest tick mark.Retrieves the value changing property of the slider.Gets the value property of the slider.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, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties 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 ClassesModifier and TypeClassDescriptionstatic enumEnum representing various modes of a slider component. -
Field Summary
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Method Summary
Modifier and TypeMethodDescriptiondoubleRetrieves the block increment value of the slider.doubleRetrieves the major tick unit for the slider.doublegetMax()Retrieves the maximum value of the slider.doublegetMin()Retrieves the minimum value of the slider.doubleRetrieves the number of minor tick marks to be displayed on the slider.getMode()Retrieves the operation mode of the slider.doublegetValue()Retrieves the current value of the slider.Returns the label formatter property of the slider.Retrieves the major tick unit property of the slider.Returns the DoubleProperty representing the maximum value of the slider.Retrieves the property for the minor tick count of the slider.Retrieves the minimum value property of the slider.voidsetBlockIncrement(double value) Sets the block increment value for the slider.voidsetDecrementGraphic(Node value) Sets the graphical representation for the decrement button of the slider.voidsetDecrementText(String value) Sets the text of the decrement button in the slider.voidsetIncrementGraphic(Node value) Sets the graphic for the increment button on the slider.voidsetIncrementText(String value) Sets the text label for the increment button on the slider.voidsetMax(double value) Sets the maximum value for the slider.voidsetMin(double value) Sets the minimum value for the slider.voidsetOrientation(Orientation orientation) Sets the orientation of the slider.voidsetShowTickLabels(boolean value) Configures whether to show the tick labels on the slider.voidsetShowTickMarks(boolean value) Configures whether the slider should display tick marks.voidsetValue(double value) Sets the value of the slider.Retrieves the property for showing or hiding tick labels on the slider.Retrieves the property representing whether tick marks are shown on the slider.Represents the property that indicates whether the slider will snap to the closest tick mark.Retrieves the value changing property of the slider.Gets the value property of the slider.Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, 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, widthPropertyMethods inherited from class javafx.scene.Parent
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, 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, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
value
Gets the value property of the slider.- See Also:
-
min
Retrieves the minimum value property of the slider.- See Also:
-
max
Returns the DoubleProperty representing the maximum value of the slider.- See Also:
-
majorTickUnit
Retrieves the major tick unit property of the slider.- See Also:
-
minorTickCount
Retrieves the property for the minor tick count of the slider.- See Also:
-
valueChanging
Retrieves the value changing property of the slider. -
labelFormatter
Returns the label formatter property of the slider. This property allows for a custom string converter to format the labels of the slider. -
showTickLabels
Retrieves the property for showing or hiding tick labels on the slider.- See Also:
-
showTickMarks
Retrieves the property representing whether tick marks are shown on the slider.- See Also:
-
snapToTicks
Represents the property that indicates whether the slider will snap to the closest tick mark.
-
-
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
Sets the orientation of the slider.- Parameters:
orientation- the Orientation to set for the slider- See Also:
-
getMode
Retrieves the operation mode of the slider.- Returns:
- the current mode in which the slider is operating.
- See Also:
-
setDecrementText
Sets the text of the decrement button in the slider.- Parameters:
value- the text to be displayed on the decrement button
-
setDecrementGraphic
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
Sets the text label for the increment button on the slider.- Parameters:
value- the text to set on the increment button
-
setIncrementGraphic
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
Gets the value property of the slider.- See Also:
-
minProperty
Retrieves the minimum value property of the slider.- See Also:
-
maxProperty
Returns the DoubleProperty representing the maximum value of the slider.- See Also:
-
majorTickUnitProperty
Retrieves the major tick unit property of the slider.- See Also:
-
minorTickCountProperty
Retrieves the property for the minor tick count of the slider.- See Also:
-
valueChangingProperty
Retrieves the value changing property of the slider. -
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
Retrieves the property for showing or hiding tick labels on the slider.- See Also:
-
showTickMarksProperty
Retrieves the property representing whether tick marks are shown on the slider.- See Also:
-
snapToTicksProperty
Represents the property that indicates whether the slider will snap to the closest tick mark.
-