Fantom

 

class

fwt::TreeModel

sys::Obj
  fwt::TreeModel

TreeModel models the data of a tree widget.

Slots

bgSource

virtual Color? bg(Obj node)

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

childrenSource

virtual Obj[] children(Obj node)

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

fgSource

virtual Color? fg(Obj node)

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

fontSource

virtual Font? font(Obj node)

Get the font for specified node or null for default.

hasChildrenSource

virtual Bool hasChildren(Obj node)

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.

imageSource

virtual Image? image(Obj node)

Get the image to display for specified node or null.

rootsSource

virtual Obj[] roots()

Get root nodes.

textSource

virtual Str text(Obj node)

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