class fwt::TreeModel

sys::Obj
  fwt::TreeModel

@Js

Source

TreeModel models the data of a tree widget.

bg

virtual Color? bg(Obj node)

Source

Get the background color for specified node or null for default.

children

virtual Obj[] children(Obj node)

Source

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

fg

virtual Color? fg(Obj node)

Source

Get the foreground color for specified node or null for default.

font

virtual Font? font(Obj node)

Source

Get the font for specified node or null for default.

hasChildren

virtual Bool hasChildren(Obj node)

Source

Return 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.

image

virtual Image? image(Obj node)

Source

Get the image to display for specified node or null.

roots

virtual Obj[] roots()

Source

Get root nodes.

text

virtual Str text(Obj node)

Source

Get the text to display for specified node. Default is node.toStr.