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
Write access to scrollbars.
-
Method Summary
Modifier and TypeMethodDescriptionvoidRemove any listeners that are executed when the thumb is dragged.voidsetHideIfDisabled(SyScrollBarHideIfDisabled hideIfDisabled) Allow for hiding the scrollbar if it is disabled.voidsetOnThumbDragListener(Consumer<SyScrollBarDrag> listener) Set a listener that will be executed when the thumb is dragged.voidsetScrollAmountShown(double amount) Scrollbars are typically used to scroll a visible portion of some larger structure.voidsetScrollPosition(double position) Set the scroll position in the range[0, 1].voidsetScrollPositionSnapping(double fraction) Set the scroll position snapping value in the range[0, 1].Methods inherited from interface SyActiveReadableType
isMouseOverMethods inherited from interface SyActiveType
activity, setActiveMethods inherited from interface SyBoundedReadableType
boundingAreaMethods inherited from interface SyBoundedType
position, setPositionMethods inherited from interface SyComponentReadableType
ancestorMatchingReadable, childCount, isActive, isVisible, nodeReadable, relativePositionOf, screen, viewportPositionOf, windowReadableMethods inherited from interface SyComponentType
ancestorMatching, childAdd, childRemove, childrenClear, componentForWindowRelative, layout, node, windowMethods inherited from interface SyEventReceiverType
eventSendMethods inherited from interface SyKeyboardFocusableType
keyboardFocusBehaviorMethods inherited from interface SyMouseFocusAcceptingReadableType
isMouseQueryAcceptingMethods inherited from interface SyMouseFocusAcceptingType
setMouseQueryAcceptingMethods inherited from interface SyScrollBarReadableType
scrollAmountShown, scrollIncrementSize, scrollPosition, scrollPositionSnapping, thumb, trackMethods inherited from interface SySizedType
setSize, setSizeUpperLimit, size, sizeUpperLimitMethods inherited from interface SyThemeableReadableType
themeClassesDefaultForComponent, themeClassesExtra, themeClassesInPreferenceOrderMethods inherited from interface SyVisibleType
setVisible, visibility
-
Method Details
-
setHideIfDisabled
Allow for hiding the scrollbar if it is disabled. If hiding-if-disabled is enabled, then the scrollbar's size will collapse to zero whenSyComponentType.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 of1.0 / 4.0will 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 of0.0means that an infinitely small piece of the larger structure is visible. A value of1.0means that the entirety of the larger structure is visible.- Parameters:
amount- The amount shown
-
setOnThumbDragListener
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:
-