mixinafReflux::ResourceTreeModel
afReflux::ResourceTreeModel
A model to customise the look of a ResourceTree
.
- bg
virtual Color? bg(Resource resource)
Get the background color for specified node or
null
for default.- children
virtual Uri[] children(Resource resource)
Returns the children (resource URIs) of the specified node. If no children return an empty list.
Defaults to
resource.children
.- fg
virtual Color? fg(Resource resource)
Get the foreground color for specified node or
null
for default.- font
virtual Font? font(Resource resource)
Get the font for specified resource or
null
for default.- hasChildren
virtual Bool hasChildren(Resource resource)
Return if this has or might have children. This is an optimisation to display an expansion control without actually loading all the children.
Defaults to
resource.hasChildren
.- image
virtual Image? image(Resource resource)
Get the image to display. Defaults to
resource.icon
.- text
virtual Str text(Resource resource)
Get the text to display. Defaults to
resource.name
.