Class VFXScrollPane

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
io.github.palexdev.mfxcore.controls.Control<VFXScrollPaneBehavior>
io.github.palexdev.virtualizedfx.controls.VFXScrollPane
All Implemented Interfaces:
io.github.palexdev.mfxcore.behavior.WithBehavior<VFXScrollPaneBehavior>, io.github.palexdev.mfxcore.controls.MFXSkinnable<io.github.palexdev.mfxcore.controls.SkinBase<?,?>>, io.github.palexdev.mfxcore.controls.MFXStyleable, Styleable, EventTarget, Skinnable

public class VFXScrollPane extends io.github.palexdev.mfxcore.controls.Control<VFXScrollPaneBehavior> implements io.github.palexdev.mfxcore.controls.MFXStyleable
My personal custom implementation of a scroll pane from scratch, follows the MVC pattern as enforced by Control. The default skin is VFXScrollPaneSkin. The default behavior is VFXScrollPaneBehavior. Also implements MFXStyleable.

Features:

- You can change how the scroll bars are laid out as well as their appearance with the layoutModeProperty()

- You can align the content within the viewport by setting the alignmentProperty() (works only when the content is smaller than the viewport)

- The mainAxisProperty() determines which is the primary scroll direction. By default, it's vertical and to scroll horizontally you have to press the Shift key

- You can make the content always fit the size of the scroll pane by setting the properties fitToWidthProperty() and fitToHeightProperty() (works only for non-virtualized contents)

- You choose on which side to have the two scroll bars with vBarPosProperty() and hBarPosProperty()

- The scrollBarsGapProperty() determines how much space separates the scroll bars

- You can make the scroll bars hide automatically after a certain amount of time, autoHideBarsProperty()

- You can disable the bars and the scrolling by setting the relative policies: vBarPolicyProperty(), hBarPolicyProperty()

- Allows scrolling by dragging the mouse on the viewport by enabling the dragToScrollProperty(), and it's also possible to enable smooth scrolling for it: dragSmoothScrollProperty()

- All the properties of VFXScrollBar are ported and bound here: vTrackIncrementProperty(), vUnitIncrementProperty(), hTrackIncrementProperty(), hUnitIncrementProperty(), showButtonsProperty(), buttonsGapProperty(), smoothScrollProperty(), trackSmoothScrollProperty()

- Finally you can set the radius for the viewport's clip with the clipBorderRadiusProperty()

Uses two new PseudoClasses:

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

- ":drag-to-scroll": active when the dragToScrollProperty() is set to true

Last but not least, since this uses the new VFXScrollBars, it also allows to change their behavior with hBarBehaviorProperty() and vBarBehaviorProperty().
  • Property Details

  • Field Details

    • DRAG_TO_SCROLL_PSEUDO_CLASS

      public static final PseudoClass DRAG_TO_SCROLL_PSEUDO_CLASS
  • Constructor Details

    • VFXScrollPane

      public VFXScrollPane()
    • VFXScrollPane

      public VFXScrollPane(Node content)
  • Method Details

    • getContentBounds

      public io.github.palexdev.mfxcore.base.beans.Size getContentBounds()
      Returns:
      the appropriate sizes for the scroll pane's content. For virtualized containers (VFXContainer) the values are given by the VFXContainer.virtualMaxXProperty() and the VFXContainer.virtualMaxYProperty()
    • defaultSkinProvider

      public Supplier<io.github.palexdev.mfxcore.controls.SkinBase<?,?>> defaultSkinProvider()
      Specified by:
      defaultSkinProvider in interface io.github.palexdev.mfxcore.controls.MFXSkinnable<io.github.palexdev.mfxcore.controls.SkinBase<?,?>>
    • defaultBehaviorProvider

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

      public List<String> defaultStyleClasses()
      Specified by:
      defaultStyleClasses in interface io.github.palexdev.mfxcore.controls.MFXStyleable
    • getLayoutMode

      public ScrollPaneEnums.LayoutMode getLayoutMode()
      Gets the value of the layoutMode property.
      Property description:
      Returns:
      the value of the layoutMode property
      See Also:
    • layoutModeProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<ScrollPaneEnums.LayoutMode> layoutModeProperty()
      Returns:
      the layoutMode property
      See Also:
    • setLayoutMode

      public void setLayoutMode(ScrollPaneEnums.LayoutMode layoutMode)
      Sets the value of the layoutMode property.
      Property description:
      Parameters:
      layoutMode - the value for the layoutMode property
      See Also:
    • getAlignment

      public Pos getAlignment()
      Gets the value of the alignment property.
      Property description:
      Allows to align the scroll pane's content within its viewport. The alignment is ignored if the content is larger than the viewport.

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

      Returns:
      the value of the alignment property
      See Also:
    • alignmentProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<Pos> alignmentProperty()
      Allows to align the scroll pane's content within its viewport. The alignment is ignored if the content is larger than the viewport.

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

      Returns:
      the alignment property
      See Also:
    • setAlignment

      public void setAlignment(Pos alignment)
      Sets the value of the alignment property.
      Property description:
      Allows to align the scroll pane's content within its viewport. The alignment is ignored if the content is larger than the viewport.

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

      Parameters:
      alignment - the value for the alignment property
      See Also:
    • getMainAxis

      public Orientation getMainAxis()
      Gets the value of the mainAxis property.
      Property description:
      Specifies the main scroll axis.

      This is used by the skin to determine the behavior of the scroll when the Shift button is pressed. By default, for:

      - VERTICAL orientation: if Shift is pressed the scroll will be horizontal

      - HORIZONTAL orientation: if Shift is pressed the scroll will be vertical

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

      Returns:
      the value of the mainAxis property
      See Also:
    • mainAxisProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<Orientation> mainAxisProperty()
      Specifies the main scroll axis.

      This is used by the skin to determine the behavior of the scroll when the Shift button is pressed. By default, for:

      - VERTICAL orientation: if Shift is pressed the scroll will be horizontal

      - HORIZONTAL orientation: if Shift is pressed the scroll will be vertical

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

      Returns:
      the mainAxis property
      See Also:
    • setMainAxis

      public void setMainAxis(Orientation mainAxis)
      Sets the value of the mainAxis property.
      Property description:
      Specifies the main scroll axis.

      This is used by the skin to determine the behavior of the scroll when the Shift button is pressed. By default, for:

      - VERTICAL orientation: if Shift is pressed the scroll will be horizontal

      - HORIZONTAL orientation: if Shift is pressed the scroll will be vertical

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

      Parameters:
      mainAxis - the value for the mainAxis property
      See Also:
    • isFitToWidth

      public boolean isFitToWidth()
      Gets the value of the fitToWidth property.
      Property description:
      Makes the content be at least as wide as the scroll pane.

      This is also settable via CSS with the "-vfx-fit-to-width" property.

      Returns:
      the value of the fitToWidth property
      See Also:
    • fitToWidthProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty fitToWidthProperty()
      Makes the content be at least as wide as the scroll pane.

      This is also settable via CSS with the "-vfx-fit-to-width" property.

      Returns:
      the fitToWidth property
      See Also:
    • setFitToWidth

      public void setFitToWidth(boolean fitToWidth)
      Sets the value of the fitToWidth property.
      Property description:
      Makes the content be at least as wide as the scroll pane.

      This is also settable via CSS with the "-vfx-fit-to-width" property.

      Parameters:
      fitToWidth - the value for the fitToWidth property
      See Also:
    • isFitToHeight

      public boolean isFitToHeight()
      Gets the value of the fitToHeight property.
      Property description:
      Makes the content be at least as tall as the scroll pane.

      This is also settable via CSS with the "-vfx-fit-to-height" property.

      Returns:
      the value of the fitToHeight property
      See Also:
    • fitToHeightProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty fitToHeightProperty()
      Makes the content be at least as tall as the scroll pane.

      This is also settable via CSS with the "-vfx-fit-to-height" property.

      Returns:
      the fitToHeight property
      See Also:
    • setFitToHeight

      public void setFitToHeight(boolean fitToHeight)
      Sets the value of the fitToHeight property.
      Property description:
      Makes the content be at least as tall as the scroll pane.

      This is also settable via CSS with the "-vfx-fit-to-height" property.

      Parameters:
      fitToHeight - the value for the fitToHeight property
      See Also:
    • getVBarPos

      public ScrollPaneEnums.VBarPos getVBarPos()
      Gets the value of the vBarPos property.
      Property description:
      Specifies the position of the vertical scroll bar.

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

      Returns:
      the value of the vBarPos property
      See Also:
    • vBarPosProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<ScrollPaneEnums.VBarPos> vBarPosProperty()
      Specifies the position of the vertical scroll bar.

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

      Returns:
      the vBarPos property
      See Also:
    • setVBarPos

      public void setVBarPos(ScrollPaneEnums.VBarPos vBarPos)
      Sets the value of the vBarPos property.
      Property description:
      Specifies the position of the vertical scroll bar.

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

      Parameters:
      vBarPos - the value for the vBarPos property
      See Also:
    • getHBarPos

      public ScrollPaneEnums.HBarPos getHBarPos()
      Gets the value of the hBarPos property.
      Property description:
      Specifies the position of the horizontal scroll bar.

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

      Returns:
      the value of the hBarPos property
      See Also:
    • hBarPosProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<ScrollPaneEnums.HBarPos> hBarPosProperty()
      Specifies the position of the horizontal scroll bar.

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

      Returns:
      the hBarPos property
      See Also:
    • setHBarPos

      public void setHBarPos(ScrollPaneEnums.HBarPos hBarPos)
      Sets the value of the hBarPos property.
      Property description:
      Specifies the position of the horizontal scroll bar.

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

      Parameters:
      hBarPos - the value for the hBarPos property
      See Also:
    • setScrollBarsPos

      public void setScrollBarsPos(Pos pos)
      Convenience method to combine setVBarPos(VBarPos) and setHBarPos(HBarPos). However, note that only four positions are allowed: Pos.TOP_LEFT, Pos.TOP_RIGHT, Pos.BOTTOM_LEFT, Pos.BOTTOM_RIGHT (default!).
    • getScrollBarsGap

      public double getScrollBarsGap()
      Gets the value of the scrollBarsGap property.
      Property description:
      Determines how much space divides the two scroll bars. Imagine this as the corner UI element that was present in the scroll panes back in the day.

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

      Returns:
      the value of the scrollBarsGap property
      See Also:
    • scrollBarsGapProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty scrollBarsGapProperty()
      Determines how much space divides the two scroll bars. Imagine this as the corner UI element that was present in the scroll panes back in the day.

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

      Returns:
      the scrollBarsGap property
      See Also:
    • setScrollBarsGap

      public void setScrollBarsGap(double scrollBarsGap)
      Sets the value of the scrollBarsGap property.
      Property description:
      Determines how much space divides the two scroll bars. Imagine this as the corner UI element that was present in the scroll panes back in the day.

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

      Parameters:
      scrollBarsGap - the value for the scrollBarsGap property
      See Also:
    • isAutoHideBars

      public boolean isAutoHideBars()
      Gets the value of the autoHideBars property.
      Property description:
      Specifies whether to auto hide the scroll bars after a certain amount of time.

      This is also settable via CSS with the "-vfx-auto-hide-bars" property.

      Returns:
      the value of the autoHideBars property
      See Also:
    • autoHideBarsProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty autoHideBarsProperty()
      Specifies whether to auto hide the scroll bars after a certain amount of time.

      This is also settable via CSS with the "-vfx-auto-hide-bars" property.

      Returns:
      the autoHideBars property
      See Also:
    • setAutoHideBars

      public void setAutoHideBars(boolean autoHideBars)
      Sets the value of the autoHideBars property.
      Property description:
      Specifies whether to auto hide the scroll bars after a certain amount of time.

      This is also settable via CSS with the "-vfx-auto-hide-bars" property.

      Parameters:
      autoHideBars - the value for the autoHideBars property
      See Also:
    • getVBarPolicy

      public ScrollPaneEnums.ScrollBarPolicy getVBarPolicy()
      Gets the value of the vBarPolicy property.
      Property description:
      Specifies the vertical scroll bar visibility policy.

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

      Returns:
      the value of the vBarPolicy property
      See Also:
    • vBarPolicyProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<ScrollPaneEnums.ScrollBarPolicy> vBarPolicyProperty()
      Specifies the vertical scroll bar visibility policy.

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

      Returns:
      the vBarPolicy property
      See Also:
    • setVBarPolicy

      public void setVBarPolicy(ScrollPaneEnums.ScrollBarPolicy vBarPolicy)
      Sets the value of the vBarPolicy property.
      Property description:
      Specifies the vertical scroll bar visibility policy.

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

      Parameters:
      vBarPolicy - the value for the vBarPolicy property
      See Also:
    • getHBarPolicy

      public ScrollPaneEnums.ScrollBarPolicy getHBarPolicy()
      Gets the value of the hBarPolicy property.
      Property description:
      Specifies the horizontal scroll bar visibility policy.

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

      Returns:
      the value of the hBarPolicy property
      See Also:
    • hBarPolicyProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableObjectProperty<ScrollPaneEnums.ScrollBarPolicy> hBarPolicyProperty()
      Specifies the horizontal scroll bar visibility policy.

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

      Returns:
      the hBarPolicy property
      See Also:
    • setHBarPolicy

      public void setHBarPolicy(ScrollPaneEnums.ScrollBarPolicy hBarPolicy)
      Sets the value of the hBarPolicy property.
      Property description:
      Specifies the horizontal scroll bar visibility policy.

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

      Parameters:
      hBarPolicy - the value for the hBarPolicy property
      See Also:
    • getVTrackIncrement

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

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

      Returns:
      the value of the vTrackIncrement property
      See Also:
    • vTrackIncrementProperty

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

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

      Returns:
      the vTrackIncrement property
      See Also:
    • setVTrackIncrement

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

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

      Parameters:
      trackIncrement - the value for the vTrackIncrement property
      See Also:
    • getVUnitIncrement

      public double getVUnitIncrement()
      Gets the value of the vUnitIncrement property.
      Property description:
      Specifies the amount added/subtracted to the vertical scroll bar's value used by the buttons and by scrolling.

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

      Returns:
      the value of the vUnitIncrement property
      See Also:
    • vUnitIncrementProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty vUnitIncrementProperty()
      Specifies the amount added/subtracted to the vertical scroll bar's value used by the buttons and by scrolling.

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

      Returns:
      the vUnitIncrement property
      See Also:
    • setVUnitIncrement

      public void setVUnitIncrement(double unitIncrement)
      Sets the value of the vUnitIncrement property.
      Property description:
      Specifies the amount added/subtracted to the vertical scroll bar's value used by the buttons and by scrolling.

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

      Parameters:
      unitIncrement - the value for the vUnitIncrement property
      See Also:
    • getHTrackIncrement

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

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

      Returns:
      the value of the hTrackIncrement property
      See Also:
    • hTrackIncrementProperty

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

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

      Returns:
      the hTrackIncrement property
      See Also:
    • setHTrackIncrement

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

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

      Parameters:
      hTrackIncrement - the value for the hTrackIncrement property
      See Also:
    • getHUnitIncrement

      public double getHUnitIncrement()
      Gets the value of the hUnitIncrement property.
      Property description:
      Specifies the amount added/subtracted to the horizontal scroll bar's value used by the buttons and by scrolling.

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

      Returns:
      the value of the hUnitIncrement property
      See Also:
    • hUnitIncrementProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty hUnitIncrementProperty()
      Specifies the amount added/subtracted to the horizontal scroll bar's value used by the buttons and by scrolling.

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

      Returns:
      the hUnitIncrement property
      See Also:
    • setHUnitIncrement

      public void setHUnitIncrement(double hUnitIncrement)
      Sets the value of the hUnitIncrement property.
      Property description:
      Specifies the amount added/subtracted to the horizontal scroll bar's value used by the buttons and by scrolling.

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

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

      public boolean isShowButtons()
      Gets the value of the showButtons property.
      Property description:
      Specifies whether to show or not the scroll bars' buttons.

      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 to show or not the scroll bars' buttons.

      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 to show or not the scroll bars' buttons.

      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 scroll bars' thumb and their buttons.

      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 scroll bars' thumb and their buttons.

      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 scroll bars' thumb and their buttons.

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

      Parameters:
      buttonsGap - the value for the buttonsGap 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:
    • isDragToScroll

      public boolean isDragToScroll()
      Gets the value of the dragToScroll property.
      Property description:
      Specifies whether the content can be scrolled with mouse dragging.

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

      Returns:
      the value of the dragToScroll property
      See Also:
    • dragToScrollProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty dragToScrollProperty()
      Specifies whether the content can be scrolled with mouse dragging.

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

      Returns:
      the dragToScroll property
      See Also:
    • setDragToScroll

      public void setDragToScroll(boolean dragToScroll)
      Sets the value of the dragToScroll property.
      Property description:
      Specifies whether the content can be scrolled with mouse dragging.

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

      Parameters:
      dragToScroll - the value for the dragToScroll property
      See Also:
    • isDragSmoothScroll

      public boolean isDragSmoothScroll()
      Gets the value of the dragSmoothScroll property.
      Property description:
      Specifies whether to use animations for the dragToScrollProperty() feature, making the scroll smooth.

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

      Returns:
      the value of the dragSmoothScroll property
      See Also:
    • dragSmoothScrollProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty dragSmoothScrollProperty()
      Specifies whether to use animations for the dragToScrollProperty() feature, making the scroll smooth.

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

      Returns:
      the dragSmoothScroll property
      See Also:
    • setDragSmoothScroll

      public void setDragSmoothScroll(boolean dragSmoothScroll)
      Sets the value of the dragSmoothScroll property.
      Property description:
      Specifies whether to use animations for the dragToScrollProperty() feature, making the scroll smooth.

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

      Parameters:
      dragSmoothScroll - the value for the dragSmoothScroll property
      See Also:
    • getClipBorderRadius

      public double getClipBorderRadius()
      Gets the value of the clipBorderRadius property.
      Property description:
      Used by the viewport's clip to set its border radius. This is useful when you want to make a rounded scroll pane and prevents the content from going outside the view.

      Side note: the clip is a Rectangle, now for some fucking reason the rectangle's arcWidth and arcHeight values used to make it round do not act like the border-radius or background-radius properties, instead their value is usually 2 / 2.5 times the latter. So for a border radius of 5 you want this value to be at least 10/13.

      This is also settable via CSS with the "-vfx-clip-border-radius" property.

      Returns:
      the value of the clipBorderRadius property
      See Also:
    • clipBorderRadiusProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableDoubleProperty clipBorderRadiusProperty()
      Used by the viewport's clip to set its border radius. This is useful when you want to make a rounded scroll pane and prevents the content from going outside the view.

      Side note: the clip is a Rectangle, now for some fucking reason the rectangle's arcWidth and arcHeight values used to make it round do not act like the border-radius or background-radius properties, instead their value is usually 2 / 2.5 times the latter. So for a border radius of 5 you want this value to be at least 10/13.

      This is also settable via CSS with the "-vfx-clip-border-radius" property.

      Returns:
      the clipBorderRadius property
      See Also:
    • setClipBorderRadius

      public void setClipBorderRadius(double clipBorderRadius)
      Sets the value of the clipBorderRadius property.
      Property description:
      Used by the viewport's clip to set its border radius. This is useful when you want to make a rounded scroll pane and prevents the content from going outside the view.

      Side note: the clip is a Rectangle, now for some fucking reason the rectangle's arcWidth and arcHeight values used to make it round do not act like the border-radius or background-radius properties, instead their value is usually 2 / 2.5 times the latter. So for a border radius of 5 you want this value to be at least 10/13.

      This is also settable via CSS with the "-vfx-clip-border-radius" property.

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

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

      protected List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData()
      Overrides:
      getControlCssMetaData in class Control
    • getContent

      public Node getContent()
      Gets the value of the content property.
      Property description:
      Specifies the current scroll pane's content.
      Returns:
      the value of the content property
      See Also:
    • contentProperty

      public ObjectProperty<Node> contentProperty()
      Specifies the current scroll pane's content.
      Returns:
      the content property
      See Also:
    • setContent

      public void setContent(Node content)
      Sets the value of the content property.
      Property description:
      Specifies the current scroll pane's content.
      Parameters:
      content - the value for the content property
      See Also:
    • getVMin

      public double getVMin()
      Gets the value of the vMin property.
      Property description:
      Specifies the vertical scroll bar's minimum value.
      Returns:
      the value of the vMin property
      See Also:
    • vMinProperty

      public DoubleProperty vMinProperty()
      Specifies the vertical scroll bar's minimum value.
      Returns:
      the vMin property
      See Also:
    • setVMin

      public void setVMin(double vMin)
      Sets the value of the vMin property.
      Property description:
      Specifies the vertical scroll bar's minimum value.
      Parameters:
      vMin - the value for the vMin property
      See Also:
    • getVValue

      public double getVValue()
      Gets the value of the vValue property.
      Property description:
      Specifies the vertical scroll bar's value.
      Returns:
      the value of the vValue property
      See Also:
    • vValueProperty

      public DoubleProperty vValueProperty()
      Specifies the vertical scroll bar's value.
      Returns:
      the vValue property
      See Also:
    • setVValue

      public void setVValue(double vValue)
      Sets the value of the vValue property.
      Property description:
      Specifies the vertical scroll bar's value.
      Parameters:
      vValue - the value for the vValue property
      See Also:
    • getVMax

      public double getVMax()
      Gets the value of the vMax property.
      Property description:
      Specifies the vertical scroll bar's maximum value.
      Returns:
      the value of the vMax property
      See Also:
    • vMaxProperty

      public DoubleProperty vMaxProperty()
      Specifies the vertical scroll bar's maximum value.
      Returns:
      the vMax property
      See Also:
    • setVMax

      public void setVMax(double vMax)
      Sets the value of the vMax property.
      Property description:
      Specifies the vertical scroll bar's maximum value.
      Parameters:
      vMax - the value for the vMax property
      See Also:
    • getHMin

      public double getHMin()
      Gets the value of the hMin property.
      Property description:
      Specifies the horizontal scroll bar's minimum value.
      Returns:
      the value of the hMin property
      See Also:
    • hMinProperty

      public DoubleProperty hMinProperty()
      Specifies the horizontal scroll bar's minimum value.
      Returns:
      the hMin property
      See Also:
    • setHMin

      public void setHMin(double hMin)
      Sets the value of the hMin property.
      Property description:
      Specifies the horizontal scroll bar's minimum value.
      Parameters:
      hMin - the value for the hMin property
      See Also:
    • getHValue

      public double getHValue()
      Gets the value of the hValue property.
      Property description:
      Specifies the horizontal scroll bar's value.
      Returns:
      the value of the hValue property
      See Also:
    • hValueProperty

      public DoubleProperty hValueProperty()
      Specifies the horizontal scroll bar's value.
      Returns:
      the hValue property
      See Also:
    • setHValue

      public void setHValue(double hValue)
      Sets the value of the hValue property.
      Property description:
      Specifies the horizontal scroll bar's value.
      Parameters:
      hValue - the value for the hValue property
      See Also:
    • getHMax

      public double getHMax()
      Gets the value of the hMax property.
      Property description:
      Specifies the horizontal scroll bar's maximum value.
      Returns:
      the value of the hMax property
      See Also:
    • hMaxProperty

      public DoubleProperty hMaxProperty()
      Specifies the horizontal scroll bar's maximum value.
      Returns:
      the hMax property
      See Also:
    • setHMax

      public void setHMax(double hMax)
      Sets the value of the hMax property.
      Property description:
      Specifies the horizontal scroll bar's maximum value.
      Parameters:
      hMax - the value for the hMax property
      See Also:
    • getVBarBehavior

      public Function<VFXScrollBar, VFXScrollBarBehavior> getVBarBehavior()
      Gets the value of the vBarBehavior property.
      Property description:
      Specifies the function used to build the vertical scroll bar's behavior.
      Returns:
      the value of the vBarBehavior property
      See Also:
    • vBarBehaviorProperty

      public io.github.palexdev.mfxcore.base.properties.functional.FunctionProperty<VFXScrollBar, VFXScrollBarBehavior> vBarBehaviorProperty()
      Specifies the function used to build the vertical scroll bar's behavior.
      Returns:
      the vBarBehavior property
      See Also:
    • setVBarBehavior

      public void setVBarBehavior(Function<VFXScrollBar, VFXScrollBarBehavior> vBarBehavior)
      Sets the value of the vBarBehavior property.
      Property description:
      Specifies the function used to build the vertical scroll bar's behavior.
      Parameters:
      vBarBehavior - the value for the vBarBehavior property
      See Also:
    • getHBarBehavior

      public Function<VFXScrollBar, VFXScrollBarBehavior> getHBarBehavior()
      Gets the value of the hBarBehavior property.
      Property description:
      Specifies the function used to build the horizontal scroll bar's behavior.
      Returns:
      the value of the hBarBehavior property
      See Also:
    • hBarBehaviorProperty

      public io.github.palexdev.mfxcore.base.properties.functional.FunctionProperty<VFXScrollBar, VFXScrollBarBehavior> hBarBehaviorProperty()
      Specifies the function used to build the horizontal scroll bar's behavior.
      Returns:
      the hBarBehavior property
      See Also:
    • setHBarBehavior

      public void setHBarBehavior(Function<VFXScrollBar, VFXScrollBarBehavior> hBarBehavior)
      Sets the value of the hBarBehavior property.
      Property description:
      Specifies the function used to build the horizontal scroll bar's behavior.
      Parameters:
      hBarBehavior - the value for the hBarBehavior property
      See Also: