type

Tree

src @Js
class Tree : Box

Tree visualizes TreeNodes as a series of expandable nodes.

See also: docDomkit

constructors

make

Constructor.

fields

roots

Root nodes for this tree.

sel

Selection for tree.

methods

expand

Set expanded state for given node.

onAction

Callback when a node has been double clicked.

onSelect

Callback when selection changes.

onTreeEvent

Callback when a event occurs inside a tree node.

rebuild

Rebuild tree layout.

refresh

Refresh tree content.

refreshNode

Refresh given node.

Slot Details

expand

src Void expand(TreeNode node, Bool expanded)

Set expanded state for given node.

make

src new make()

Constructor.

onAction

src Void onAction(|Tree,Event| f)

Callback when a node has been double clicked.

onSelect

src Void onSelect(|This| f)

Callback when selection changes.

onTreeEvent

src Void onTreeEvent(Str type, |TreeEvent| f)

Callback when a event occurs inside a tree node.

rebuild

src Void rebuild()

Rebuild tree layout.

refresh

src Void refresh()

Refresh tree content.

refreshNode

src Void refreshNode(TreeNode node)

Refresh given node.

roots

src TreeNode[] roots := TreeNode[,]

Root nodes for this tree.

sel

src Selection sel { private set }

Selection for tree. Index based selection is not supported for Tree.