ScrollableBar
A scrollable bar, with scroll buttons on the left and right (when horizontal) or at the top and bottom (when vertical).
You may also scroll using a trackpad drag gestures as well as a mouse's scroll-wheel.
This is implemented using a ScrollPane using ScrollBarPolicy.NEVER (so scroll bars are never displayed). The ScrollPane is the center
of a ThreeRow, with left
and right
for the scroll buttons. The scroll buttons only appear when needed (i.e. when there is insufficient space to show the whole of the content).
Anatomy
╭─────────────ScrollableBar─────────────╮
│ ╭──────────────ThreeRow─────────────╮ │
│ │ ╭───────ScrollPane──────╮ │ │
│ │ < │ content │ > │ │
│ │ ╰───────────────────────╯ │ │
│ ╰───────────────────────────────────╯ │
╰───────────────────────────────────────╯
The scroll buttons (displayed above a < and >) are only visible when content is wider than the available space.
Properties
The center of threeRow.
Scroll buttons are on the left
and right
(or top
and bottom
), The center
is a scrollPane whose content
is bound to this control's content.
Functions
Each subclass of node can determine the minimum width it requires. This can be overridden on an ad-hoc basis using overrideMinHeight. The default implementation returns 0.
Each subclass of node can determine the minimum width it requires. This can be overridden on an ad-hoc basis using overrideMinWidth. The default implementation returns 0.
Each subclass of node can determine its preferred height. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.
Each subclass of node can determine its preferred width. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.