Class VFXScrollBar

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
io.github.palexdev.mfxcore.controls.Control<VFXScrollBarBehavior>
io.github.palexdev.virtualizedfx.controls.VFXScrollBar
All Implemented Interfaces:
io.github.palexdev.mfxcore.behavior.WithBehavior<VFXScrollBarBehavior>, VFXStyleable, javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable

public class VFXScrollBar extends io.github.palexdev.mfxcore.controls.Control<VFXScrollBarBehavior> implements VFXStyleable
My personal custom implementation of a scroll bar from scratch, follows the MVC pattern as enforced by Control. The default skin is VFXScrollBarSkin. The default behavior is VFXScrollBarBehavior. Also implements VFXStyleable.

In addition to an appealing style, the component offers many new features compared to the boring standard JavaFX' scroll bar, such as:

- standard or slim appearance (depends on the stylesheet!), layoutModeProperty()

- the possibility of showing/hiding the increase and decrease buttons, showButtonsProperty()

- the possibility of controlling the gap between the buttons and the thumb, buttonsGapProperty()

- inbuilt smooth scroll both for the thumb and the track, smoothScrollProperty(), trackSmoothScrollProperty()

- the possibility of querying the scroll direction, scrollDirectionProperty()

Three PseudoClass worth mentioning:

- ":compact": active when the layoutModeProperty() is set to ScrollPaneEnums.LayoutMode.COMPACT

- ":buttons": active when the increment and decrement buttons are visible, showButtonsProperty()

- ":dragging": active when the thumb is being dragged

- ":horizontal": active when the scroll bar's orientation is HORIZONTAL

- ":vertical": active when the scroll bar's orientation is VERTICAL

For the sake of simplicity and abstraction, the bar's values are expressed as percentages. The minimum and maximum values can be set by using setMin(double) and setMax(double) but cannot go below 0.0 and above 1.0 respectively. The valueProperty() is automatically clamped between the min and max values.
  • Property Summary

    Properties
    Type
    Property
    Description
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty
    Specifies the gap between the increase/decrease buttons and the track.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<ScrollPaneEnums.LayoutMode>
    Specifies the scroll bar's appearance.
    javafx.beans.property.DoubleProperty
    Specifies the maximum possible value for valueProperty().
    javafx.beans.property.DoubleProperty
    Specifies the minimum possible value for valueProperty().
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<javafx.geometry.Orientation>
    Specifies the scroll bar's orientation.
    javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.utils.fx.ScrollUtils.ScrollDirection>
    Specifies the current scroll direction.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty
    Specifies whether the increase/decrease buttons are visible.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty
    Specifies whether the scrolling should be smooth, done by animations.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty
    Specifies the amount added/subtracted to the valueProperty() used by the scroll bar's track.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty
    Specifies if the scrolling made by the track should be smooth, done by animations.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty
    Specifies the amount added/subtracted to the valueProperty() used by the increment/decrement buttons and by scrolling.
    javafx.beans.property.DoubleProperty
    Specifies the scroll value, clamped between minProperty() and maxProperty().
    javafx.beans.property.DoubleProperty
    Specifies how much content is visible.

    Properties inherited from class io.github.palexdev.mfxcore.controls.Control

    behaviorProvider

    Properties inherited from class javafx.scene.control.Control

    contextMenu, skin, tooltip

    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, width

    Properties inherited from class javafx.scene.Parent

    needsLayout

    Properties 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, focusVisible, focusWithin, 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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final javafx.css.PseudoClass
     
    static final javafx.css.PseudoClass
     
    static final javafx.css.PseudoClass
     
    static final javafx.css.PseudoClass
     

    Fields inherited from class javafx.scene.layout.Region

    USE_COMPUTED_SIZE, USE_PREF_SIZE

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    VFXScrollBar(javafx.geometry.Orientation orientation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected io.github.palexdev.mfxcore.controls.SkinBase<?,?>
     
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty
    Specifies the gap between the increase/decrease buttons and the track.
     
     
    double
    Gets the value of the buttonsGap property.
    static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>
     
    protected List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>
     
    Gets the value of the layoutMode property.
    double
    Gets the value of the max property.
    double
    Gets the value of the min property.
    javafx.geometry.Orientation
    Gets the value of the orientation property.
    io.github.palexdev.mfxcore.utils.fx.ScrollUtils.ScrollDirection
    Gets the value of the scrollDirection property.
    double
    Gets the value of the trackIncrement property.
    double
    Gets the value of the unitIncrement property.
    double
    Gets the value of the value property.
    double
    Gets the value of the visibleAmount property.
    boolean
    Gets the value of the showButtons property.
    boolean
    Gets the value of the smoothScroll property.
    boolean
    Gets the value of the trackSmoothScroll property.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<ScrollPaneEnums.LayoutMode>
    Specifies the scroll bar's appearance.
    javafx.beans.property.DoubleProperty
    Specifies the maximum possible value for valueProperty().
    javafx.beans.property.DoubleProperty
    Specifies the minimum possible value for valueProperty().
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<javafx.geometry.Orientation>
    Specifies the scroll bar's orientation.
    javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.utils.fx.ScrollUtils.ScrollDirection>
    Specifies the current scroll direction.
    void
    setButtonsGap(double buttonsGap)
    Sets the value of the buttonsGap property.
    void
    Sets the value of the layoutMode property.
    void
    setMax(double max)
    Sets the value of the max property.
    void
    setMin(double min)
    Sets the value of the min property.
    void
    setOrientation(javafx.geometry.Orientation orientation)
    Sets the value of the orientation property.
    void
    setShowButtons(boolean showButtons)
    Sets the value of the showButtons property.
    void
    setSmoothScroll(boolean smoothScroll)
    Sets the value of the smoothScroll property.
    void
    setTrackIncrement(double trackIncrement)
    Sets the value of the trackIncrement property.
    void
    setTrackSmoothScroll(boolean trackSmoothScroll)
    Sets the value of the trackSmoothScroll property.
    void
    setUnitIncrement(double unitIncrement)
    Sets the value of the unitIncrement property.
    void
    setValue(double value)
    Sets the value of the value property.
    void
    setVisibleAmount(double visibleAmount)
    Sets the value of the visibleAmount property.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty
    Specifies whether the increase/decrease buttons are visible.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty
    Specifies whether the scrolling should be smooth, done by animations.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty
    Specifies the amount added/subtracted to the valueProperty() used by the scroll bar's track.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty
    Specifies if the scrolling made by the track should be smooth, done by animations.
    io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty
    Specifies the amount added/subtracted to the valueProperty() used by the increment/decrement buttons and by scrolling.
    javafx.beans.property.DoubleProperty
    Specifies the scroll value, clamped between minProperty() and maxProperty().
    javafx.beans.property.DoubleProperty
    Specifies how much content is visible.

    Methods inherited from class io.github.palexdev.mfxcore.controls.Control

    behaviorProviderProperty, changeSkin, createDefaultSkin, getBehavior, getBehaviorProvider, sceneBuilderIntegration, setBehaviorProvider

    Methods inherited from class javafx.scene.control.Control

    computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, 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, widthProperty

    Methods inherited from class javafx.scene.Parent

    getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds

    Methods 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, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, 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, isFocusVisible, isFocusWithin, 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, visibleProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode

    Methods inherited from interface io.github.palexdev.virtualizedfx.base.VFXStyleable

    setDefaultStyleClasses

    Methods inherited from interface io.github.palexdev.mfxcore.behavior.WithBehavior

    setDefaultBehaviorProvider
  • Property Details

  • Field Details

    • DRAGGING_PSEUDO_CLASS

      public static final javafx.css.PseudoClass DRAGGING_PSEUDO_CLASS
    • VERTICAL_PSEUDO_CLASS

      public static final javafx.css.PseudoClass VERTICAL_PSEUDO_CLASS
    • HORIZONTAL_PSEUDO_CLASS

      public static final javafx.css.PseudoClass HORIZONTAL_PSEUDO_CLASS
    • BUTTONS_PSEUDO_CLASS

      public static final javafx.css.PseudoClass BUTTONS_PSEUDO_CLASS
  • Constructor Details

    • VFXScrollBar

      public VFXScrollBar()
    • VFXScrollBar

      public VFXScrollBar(javafx.geometry.Orientation orientation)
  • Method Details

    • buildSkin

      protected io.github.palexdev.mfxcore.controls.SkinBase<?,?> buildSkin()
      Specified by:
      buildSkin in class io.github.palexdev.mfxcore.controls.Control<VFXScrollBarBehavior>
    • defaultBehaviorProvider

      public Supplier<VFXScrollBarBehavior> defaultBehaviorProvider()
      Specified by:
      defaultBehaviorProvider in interface io.github.palexdev.mfxcore.behavior.WithBehavior<VFXScrollBarBehavior>
    • defaultStyleClasses

      public List<String> defaultStyleClasses()
      Specified by:
      defaultStyleClasses in interface VFXStyleable
      Returns:
      a list containing all the component's default style classes
    • getLayoutMode

      public ScrollPaneEnums.LayoutMode getLayoutMode()
      Gets the value of the layoutMode property.
      Property description:
      Specifies the scroll bar's appearance. Setting this to ScrollPaneEnums.LayoutMode.COMPACT will activate the extra PseudoClass ':compact' on the control.

      Note however that this depends entirely on the stylesheet used.

      This is also settable via CSS with the "-vfx-layout-mode" property.

      Returns:
      the value of the layoutMode property
      See Also:
    • layoutModeProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<ScrollPaneEnums.LayoutMode> layoutModeProperty()
      Specifies the scroll bar's appearance. Setting this to ScrollPaneEnums.LayoutMode.COMPACT will activate the extra PseudoClass ':compact' on the control.

      Note however that this depends entirely on the stylesheet used.

      This is also settable via CSS with the "-vfx-layout-mode" property.

      Returns:
      the layoutMode property
      See Also:
    • setLayoutMode

      public void setLayoutMode(ScrollPaneEnums.LayoutMode layoutMode)
      Sets the value of the layoutMode property.
      Property description:
      Specifies the scroll bar's appearance. Setting this to ScrollPaneEnums.LayoutMode.COMPACT will activate the extra PseudoClass ':compact' on the control.

      Note however that this depends entirely on the stylesheet used.

      This is also settable via CSS with the "-vfx-layout-mode" property.

      Parameters:
      layoutMode - the value for the layoutMode property
      See Also:
    • getOrientation

      public javafx.geometry.Orientation getOrientation()
      Gets the value of the orientation property.
      Property description:
      Specifies the scroll bar's orientation.

      This is also settable via CSS with the "-vfx-orientation" property.

      Returns:
      the value of the orientation property
      See Also:
    • orientationProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<javafx.geometry.Orientation> orientationProperty()
      Specifies the scroll bar's orientation.

      This is also settable via CSS with the "-vfx-orientation" property.

      Returns:
      the orientation property
      See Also:
    • setOrientation

      public void setOrientation(javafx.geometry.Orientation orientation)
      Sets the value of the orientation property.
      Property description:
      Specifies the scroll bar's orientation.

      This is also settable via CSS with the "-vfx-orientation" property.

      Parameters:
      orientation - the value for the orientation property
      See Also:
    • isShowButtons

      public boolean isShowButtons()
      Gets the value of the showButtons property.
      Property description:
      Specifies whether the increase/decrease buttons are visible.

      This is also settable via CSS with the "-vfx-show-buttons" property.

      Returns:
      the value of the showButtons property
      See Also:
    • showButtonsProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty showButtonsProperty()
      Specifies whether the increase/decrease buttons are visible.

      This is also settable via CSS with the "-vfx-show-buttons" property.

      Returns:
      the showButtons property
      See Also:
    • setShowButtons

      public void setShowButtons(boolean showButtons)
      Sets the value of the showButtons property.
      Property description:
      Specifies whether the increase/decrease buttons are visible.

      This is also settable via CSS with the "-vfx-show-buttons" property.

      Parameters:
      showButtons - the value for the showButtons property
      See Also:
    • getButtonsGap

      public double getButtonsGap()
      Gets the value of the buttonsGap property.
      Property description:
      Specifies the gap between the increase/decrease buttons and the track.

      This is also settable via CSS with the "-vfx-buttons-gap" property.

      Returns:
      the value of the buttonsGap property
      See Also:
    • buttonsGapProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty buttonsGapProperty()
      Specifies the gap between the increase/decrease buttons and the track.

      This is also settable via CSS with the "-vfx-buttons-gap" property.

      Returns:
      the buttonsGap property
      See Also:
    • setButtonsGap

      public void setButtonsGap(double buttonsGap)
      Sets the value of the buttonsGap property.
      Property description:
      Specifies the gap between the increase/decrease buttons and the track.

      This is also settable via CSS with the "-vfx-buttons-gap" property.

      Parameters:
      buttonsGap - the value for the buttonsGap property
      See Also:
    • getTrackIncrement

      public double getTrackIncrement()
      Gets the value of the trackIncrement property.
      Property description:
      Specifies the amount added/subtracted to the valueProperty() used by the scroll bar's track.

      This is also settable via CSS with the "-vfx-track-increment" property.

      Returns:
      the value of the trackIncrement property
      See Also:
    • trackIncrementProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty trackIncrementProperty()
      Specifies the amount added/subtracted to the valueProperty() used by the scroll bar's track.

      This is also settable via CSS with the "-vfx-track-increment" property.

      Returns:
      the trackIncrement property
      See Also:
    • setTrackIncrement

      public void setTrackIncrement(double trackIncrement)
      Sets the value of the trackIncrement property.
      Property description:
      Specifies the amount added/subtracted to the valueProperty() used by the scroll bar's track.

      This is also settable via CSS with the "-vfx-track-increment" property.

      Parameters:
      trackIncrement - the value for the trackIncrement property
      See Also:
    • getUnitIncrement

      public double getUnitIncrement()
      Gets the value of the unitIncrement property.
      Property description:
      Specifies the amount added/subtracted to the valueProperty() used by the increment/decrement buttons and by scrolling.

      This is also settable via CSS with the "-vfx-unit-increment" property.

      Returns:
      the value of the unitIncrement property
      See Also:
    • unitIncrementProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty unitIncrementProperty()
      Specifies the amount added/subtracted to the valueProperty() used by the increment/decrement buttons and by scrolling.

      This is also settable via CSS with the "-vfx-unit-increment" property.

      Returns:
      the unitIncrement property
      See Also:
    • setUnitIncrement

      public void setUnitIncrement(double unitIncrement)
      Sets the value of the unitIncrement property.
      Property description:
      Specifies the amount added/subtracted to the valueProperty() used by the increment/decrement buttons and by scrolling.

      This is also settable via CSS with the "-vfx-unit-increment" property.

      Parameters:
      unitIncrement - the value for the unitIncrement property
      See Also:
    • isSmoothScroll

      public boolean isSmoothScroll()
      Gets the value of the smoothScroll property.
      Property description:
      Specifies whether the scrolling should be smooth, done by animations.

      This is also settable via CSS with the "-vfx-smooth-scroll" property.

      Returns:
      the value of the smoothScroll property
      See Also:
    • smoothScrollProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty smoothScrollProperty()
      Specifies whether the scrolling should be smooth, done by animations.

      This is also settable via CSS with the "-vfx-smooth-scroll" property.

      Returns:
      the smoothScroll property
      See Also:
    • setSmoothScroll

      public void setSmoothScroll(boolean smoothScroll)
      Sets the value of the smoothScroll property.
      Property description:
      Specifies whether the scrolling should be smooth, done by animations.

      This is also settable via CSS with the "-vfx-smooth-scroll" property.

      Parameters:
      smoothScroll - the value for the smoothScroll property
      See Also:
    • isTrackSmoothScroll

      public boolean isTrackSmoothScroll()
      Gets the value of the trackSmoothScroll property.
      Property description:
      Specifies if the scrolling made by the track should be smooth, done by animations.

      The default behavior considers this feature an addition to the smoothScrollProperty(), meaning that for this to work the aforementioned feature must be enabled too.

      This is also settable via CSS with the "-vfx-track-smooth-scroll" property.

      Returns:
      the value of the trackSmoothScroll property
      See Also:
    • trackSmoothScrollProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty trackSmoothScrollProperty()
      Specifies if the scrolling made by the track should be smooth, done by animations.

      The default behavior considers this feature an addition to the smoothScrollProperty(), meaning that for this to work the aforementioned feature must be enabled too.

      This is also settable via CSS with the "-vfx-track-smooth-scroll" property.

      Returns:
      the trackSmoothScroll property
      See Also:
    • setTrackSmoothScroll

      public void setTrackSmoothScroll(boolean trackSmoothScroll)
      Sets the value of the trackSmoothScroll property.
      Property description:
      Specifies if the scrolling made by the track should be smooth, done by animations.

      The default behavior considers this feature an addition to the smoothScrollProperty(), meaning that for this to work the aforementioned feature must be enabled too.

      This is also settable via CSS with the "-vfx-track-smooth-scroll" property.

      Parameters:
      trackSmoothScroll - the value for the trackSmoothScroll property
      See Also:
    • getClassCssMetaData

      public static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getClassCssMetaData()
    • getControlCssMetaData

      protected List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getControlCssMetaData()
      Overrides:
      getControlCssMetaData in class javafx.scene.control.Control
    • getMin

      public double getMin()
      Gets the value of the min property.
      Property description:
      Specifies the minimum possible value for valueProperty().
      Returns:
      the value of the min property
      See Also:
    • minProperty

      public javafx.beans.property.DoubleProperty minProperty()
      Specifies the minimum possible value for valueProperty().
      Returns:
      the min property
      See Also:
    • setMin

      public void setMin(double min)
      Sets the value of the min property.
      Property description:
      Specifies the minimum possible value for valueProperty().
      Parameters:
      min - the value for the min property
      See Also:
    • getValue

      public double getValue()
      Gets the value of the value property.
      Property description:
      Specifies the scroll value, clamped between minProperty() and maxProperty().
      Returns:
      the value of the value property
      See Also:
    • valueProperty

      public javafx.beans.property.DoubleProperty valueProperty()
      Specifies the scroll value, clamped between minProperty() and maxProperty().
      Returns:
      the value property
      See Also:
    • setValue

      public void setValue(double value)
      Sets the value of the value property.
      Property description:
      Specifies the scroll value, clamped between minProperty() and maxProperty().
      Parameters:
      value - the value for the value property
      See Also:
    • getMax

      public double getMax()
      Gets the value of the max property.
      Property description:
      Specifies the maximum possible value for valueProperty().
      Returns:
      the value of the max property
      See Also:
    • maxProperty

      public javafx.beans.property.DoubleProperty maxProperty()
      Specifies the maximum possible value for valueProperty().
      Returns:
      the max property
      See Also:
    • setMax

      public void setMax(double max)
      Sets the value of the max property.
      Property description:
      Specifies the maximum possible value for valueProperty().
      Parameters:
      max - the value for the max property
      See Also:
    • getVisibleAmount

      public double getVisibleAmount()
      Gets the value of the visibleAmount property.
      Property description:
      Specifies how much content is visible. Depends on the components using the scroll bar and determines the length of the scroll bar's thumb relative to the track.

      Not setting this property does not compromise the component's functionality but as a consequence the bar does not indicate clearly to the user how much content is hidden.

      Returns:
      the value of the visibleAmount property
      See Also:
    • visibleAmountProperty

      public javafx.beans.property.DoubleProperty visibleAmountProperty()
      Specifies how much content is visible. Depends on the components using the scroll bar and determines the length of the scroll bar's thumb relative to the track.

      Not setting this property does not compromise the component's functionality but as a consequence the bar does not indicate clearly to the user how much content is hidden.

      Returns:
      the visibleAmount property
      See Also:
    • setVisibleAmount

      public void setVisibleAmount(double visibleAmount)
      Sets the value of the visibleAmount property.
      Property description:
      Specifies how much content is visible. Depends on the components using the scroll bar and determines the length of the scroll bar's thumb relative to the track.

      Not setting this property does not compromise the component's functionality but as a consequence the bar does not indicate clearly to the user how much content is hidden.

      Parameters:
      visibleAmount - the value for the visibleAmount property
      See Also:
    • getScrollDirection

      public io.github.palexdev.mfxcore.utils.fx.ScrollUtils.ScrollDirection getScrollDirection()
      Gets the value of the scrollDirection property.
      Property description:
      Specifies the current scroll direction. The default behavior implementation manages this.
      Returns:
      the value of the scrollDirection property
      See Also:
    • scrollDirectionProperty

      public javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.utils.fx.ScrollUtils.ScrollDirection> scrollDirectionProperty()
      Specifies the current scroll direction. The default behavior implementation manages this.
      Returns:
      the scrollDirection property
      See Also: