Interface SyScrollBarType

All Superinterfaces:
SyActiveReadableType, SyActiveType, SyBoundedReadableType<SySpaceParentRelativeType>, SyBoundedType<SySpaceParentRelativeType>, SyComponentReadableType, SyComponentType, SyEventReceiverType, SyKeyboardFocusableReadableType, SyKeyboardFocusableType, SyMouseFocusAcceptingReadableType, SyMouseFocusAcceptingType, SyScrollBarReadableType, SySizedReadableType<SySpaceParentRelativeType>, SySizedType<SySpaceParentRelativeType>, SyThemeableReadableType, SyThemeableType, SyVisibleReadableType, SyVisibleType
All Known Subinterfaces:
SyScrollBarHorizontalType, SyScrollBarVerticalType

public interface SyScrollBarType extends SyScrollBarReadableType, SyComponentType
Write access to scrollbars.
  • Method Details

    • setHideIfDisabled

      void setHideIfDisabled(SyScrollBarHideIfDisabled hideIfDisabled)
      Allow for hiding the scrollbar if it is disabled. If hiding-if-disabled is enabled, then the scrollbar's size will collapse to zero when SyComponentType.layout(SyLayoutContextType, SyConstraints) is called and the scrollbar is disabled.
      Parameters:
      hideIfDisabled - The hide-if-disabled setting
    • setScrollPosition

      void setScrollPosition(double position)
      Set the scroll position in the range [0, 1].
      Parameters:
      position - The position
    • setScrollPositionSnapping

      void setScrollPositionSnapping(double fraction)
      Set the scroll position snapping value in the range [0, 1]. The given fraction is used to determine how many divisions will be used within the scrolling space. For example, a value of 1.0 / 4.0 will yield four possible snapped position values.
      Parameters:
      fraction - The fraction
    • setScrollAmountShown

      void setScrollAmountShown(double amount)
      Scrollbars are typically used to scroll a visible portion of some larger structure. Some implementations might want to scale the scrollbar thumb based on the portion of the visible space that is visible. A value of 0.0 means that an infinitely small piece of the larger structure is visible. A value of 1.0 means that the entirety of the larger structure is visible.
      Parameters:
      amount - The amount shown
    • setOnThumbDragListener

      void setOnThumbDragListener(Consumer<SyScrollBarDrag> listener)
      Set a listener that will be executed when the thumb is dragged.
      Parameters:
      listener - The listener
    • removeOnThumbDragListener

      void removeOnThumbDragListener()
      Remove any listeners that are executed when the thumb is dragged.
      See Also: