TabBar
A list of Tabs displayed in a row or column.
Clicking on a Tab sets currentContent to that tab's Tab.content and nothing more. The content is NOT part of the TabBar. To see the tab's contents, use a SingleContainer, and bind its SingleContainer.contentProperty to TabBar.currentContent. The pair will then act as a traditional tab-pane.
TabPane combines a TabBar and a SingleContainer, but greater flexibility can be had by keeping them separate. (and not using a TabPane).
For example
lateinit var tabBar: TabBar
borderPane {
top {
toolBar {
items {
tabBar {
tabs {
tab("Hello") {
content { label("Greetings") }
}
tab("World") {
content { label("World's content") }
}
}
}
// This is impossible with a regular TabPane.
button( "Add Tab" )
button( "Tabs Settings" )
}
}
}
center {
singleContainer(tabBar.currentContentProperty)
}
}
Properties
The base class Node has no children, so this is an empty list.
Functions
The default implementation returns NO_MAXIMUM (an arbitrary large number : 100,000).
The default implementation returns NO_MAXIMUM (an arbitrary large number : 100,000).
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.