ScrollbarNode
abstract class ScrollbarNode
Extends: BaseScrollbarNode
Package: dev.joid.lib.ui.node.impl.control.scrollbar · Module: core · Source: ScrollbarNode.java
A scrollbar made of two parts: a track that covers the bar and a thumb sized and placed from the scroll of the node it serves.
Description
Section titled “Description”A skin extends it and gives its parts in its constructor; the bar places them on every frame.
Attaching a scrollbar without a thumb throws an IllegalStateException.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| ScrollbarNode(double x, double y, double width, double height) protected | Creates the bar at x, y with a width and a height in design pixels, from the constructor of a skin. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| track | Node | null | The node drawn behind the thumb, over the whole bar, with a zindex of -1; optional. |
| thumb | Node | null | The node that shows the visible part of the content: its length is getThumbLength() and its place follows getProgress(); required. |
Inherited from BaseScrollbarNode (2)
Inherited from Node (24)
x · y · width · height · position · anchor · anchorX · anchorY · aspectRatio · zindex · zlevel · skeleton · visible · enabled · interactive · cursor · hoverDuration · hoverEquation · hover · overflow · scrollSpeed · scrollbar · label · draggable
Methods
Section titled “Methods”For subclasses
Section titled “For subclasses”| Returns | Signature | Summary |
|---|---|---|
void | layout() hook | Places the track over the bar, and sizes and moves the thumb along the axis of the bar. |
Inherited from BaseScrollbarNode (6)
isHorizontal · isOverflowing · getRatio · getProgress · getThumbLength · isDragging
Inherited from Node (127)
load · render · renderHover · updateScroll · updateScrollX · updateScrollY · append · attach · body · clearChildren · getChild · getChildren · getNodeListAt · getParent · isAttached · getAbsoluteX · getAbsoluteY · getAbsoluteDefaultX · getAbsoluteDefaultY · toDrawX · toDrawY · w · h · dw · dh · mw · mh · aw · ah · ax · ay · getDefaultWidth · getDefaultHeight · removeHover · clearHover · refreshHover · getResolvedCursor · hoverValue · getHoverAnimator · isHovered · handleMousePressed · handleMouseReleased · handleMouseDragged · handleMouseScroll · handleCharTyped · handleKeyPressed · handleKeyReleased · getLastClickTime · getLastClickButton · getLastKey · getLastKeyTime · scrollX · scrollY · scrollTo · beforeScroll · hasOverflowX · hasOverflowY · getOverflowArea · getScrollX · getScrollY · getTargetScrollX · getTargetScrollY · getMaxScrollX · getMaxScrollY · isScrollEndX · isScrollEndY · startDragging · stopDragging · beforeDragStart · beforeDragDrop · getDragX · getDragY · isDragged · getDragSource · getDraggedNode · getStartDragX · getStartDragY · getTargetDragX · getTargetDragY · effect · removeEffect · clearEffects · hasEffect · getEffect · layer · clearLayers · animate · removeAnimator · wait · watch · hasListener · isVisibleProperty · isMounted · getIndex · getUi · getHierarchy · getMappedIndex · getTaskList · getShortcutList · toJson · toString · getEventBus · getBodyConsumer · getDefaultX · getDefaultY · getLayoutX · getLayoutY · getShiftX · getShiftY · isStepping · getLastCodepoint · getLoadCount · getRenderTime · remove · self · copy · useStore · addTask · removeTask · addShortcut · removeShortcut · layoutPosition · layoutSize · fit · move · beforeMove · hoverColor
Events
Section titled “Events”Inherited from Node (21)
onUpdate · onDetach · onInit · onRender · onDraw · onMount · onHoverStart · onHover · onHoverEnd · onScroll · onScrollToEnd · onScrollEndReached · onDragStart · onDrag · onDragDrop · onDragSnap · onMove · onChildAppend · onClick · onAnimate · onWatch
Creation details
Section titled “Creation details”ScrollbarNode
Section titled “ScrollbarNode”ScrollbarNode(double x, double y, double width, double height) protected
Creates the bar at x, y with a width and a height in design pixels, from the constructor of a skin.
Property details
Section titled “Property details”this track(Node track)fluentNode getTrack()
Default: null
The node drawn behind the thumb, over the whole bar, with a zindex of -1; optional.
this thumb(Node thumb)fluentNode getThumb()
Default: null
The node that shows the visible part of the content: its length is getThumbLength() and its place follows getProgress(); required.
Method details
Section titled “Method details”layout
Section titled “layout”void layout() hook
Places the track over the bar, and sizes and moves the thumb along the axis of the bar.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
