- Index
- »
- fan.domkit
- »
- TreeNode
TreeNode
@Js
abstract class TreeNode : Obj
TreeNode models a node in a Tree.
See also: docDomkit
Parent node of this node, or null if this node is a root
Is this node expanded?
Get the children of this node
Return true if this has or might have children
Callback to customize Elem for this node
virtual TreeNode[] children()
Get the children of this node. If no children return an empty list. Default behavior is no children. This method must return the same instances when called.
virtual Bool hasChildren()
Return true if this has or might have children. This is an optimization to display an expansion control without actually loading all the children. The default returns !children.isEmpty.
Bool isExpanded()
Is this node expanded?
abstract Void onElem(Elem elem, TreeFlags flags)
Callback to customize Elem for this node.
TreeNode? : parent
Parent node of this node, or null if this node is a root.