class domkit::TreeNode

sys::Obj
  domkit::TreeNode

@Js

TreeNode models a node in a Tree.

children

virtual TreeNode[] children()

Get the children of this node. If no children return an empty list. Default behavior is no children.

hasChildren

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.

make

new make(Obj obj)

Constructor.

obj

Obj obj { private set }

Backing object for this node.

onElem

virtual Void onElem(Elem elem, TreeFlags flags)

Callback to customize Elem for this node.

toStr

virtual override Str toStr()