ScrollPane

class ScrollPane(content: Node? = null) : Region, WithContent

Displays a portion of a content node, with scrollbars to pan. Some Glok controls have a built-in ScrollPanes (e.g. TextArea, ListView).

Constructors

Link copied to clipboard
constructor(content: Node? = null)

Types

Link copied to clipboard

Properties

Link copied to clipboard
open override val children: ObservableList<Region>

The base class Node has no children, so this is an empty list.

Link copied to clipboard
Link copied to clipboard
open override var content: Node?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

If content is taller than the viewport, should it be expanded to fill the whole height of the viewport?

Link copied to clipboard
Link copied to clipboard

If content is narrower than the viewport, should it be expanded to fill the whole width of the viewport?

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

The height the ScrollPane would have to be, so that the viewport could display the full height of the content.

Link copied to clipboard

The width the ScrollPane would have to be, so that the viewport could display the full width of the content.

Link copied to clipboard
open override fun nodePrefHeight(): Float

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.

Link copied to clipboard
open override fun nodePrefWidth(): Float

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.

Link copied to clipboard
fun scrollTo(contentDescendant: Node)

Ensures that contentDescendant is fully visible. contentDescendant must be a descendant of content.

Link copied to clipboard
fun scrollToX(contentX: Float)
Link copied to clipboard
fun scrollToY(contentY: Float)
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard