Basics
Guides
API Reference
Basics
Guides
API Reference
[12:7] extends: FxObj
Wraps JavaFX TreeItem, a single node in a TreeView hierarchy that holds a value and an optional set of child TreeItems. Items can be nested to any depth by calling add() with a child TreeItem or a list of them. Each item can carry an optional graphic node such as an icon. The setExpanded() method controls whether the item's children are visible in the tree by default.
TreeItem (Val = null)
Creates a new TreeItem with an optional value.
Val is the item value, or null for an empty item.add (Items)
Adds child TreeItems.
Items is a TreeItem or a list of TreeItems.this object for chainingsetExpanded (bool Expanded)
Sets whether this item is expanded.
Expanded is a bool with true to expand.this object for chaininggetValue ()
Gets the item value.
The item value.setValue (Val)
Sets the item value.
Val is the value to set.this object for chaininggetChildren ()
Returns the list of child TreeItems belonging to this item.
A list with the child TreeItem objects.getGraphic ()
Gets the graphic node associated with this tree item.
A Node with the graphic, or null if none is set.isExpanded ()
Returns whether this tree item is currently expanded.
A bool with true if the item is expanded.setGraphic (object Graphic)
Sets a graphic (icon) for the tree item.
Graphic is a Node object.this object for chaining
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.