SingleContainer
A container with one child, determined by contentProperty.
It may not be obvious at first, why this is so useful. If part of your scene-graph is dynamic, and changes whenever a property (or more than one property) changes, then consider using a SingleContainer, and binding its contentProperty to :
SimpleOptionalNodeProperty (if you want to update date it manually)
OptionalNodeUnaryFunction (if it depends on a single property)
OptionalNodeBinaryFunction (if is depends on two properties)
OptionalNodeTernaryFunction (if is depends on three properties)
For more than 3 dependencies, you could add additional dependencies to OptionalNodeTernaryFunction using LazyObservableValue.addDependent.
For examples of SingleContainer look at the source code for TabPane
, NodeInspector
or DemoChoices
.
Inheritors
Properties
If this Node has more space
When true, visibleProperty is bound to content's visibleProperty
. and when the content is null, visibleProperty is set to false.
The base class Node has no children, so this is an empty list.
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.