class fwt::Tree
sys::Obj fwt::Widget fwt::Tree
Tree displays a hierarchy of tree nodes which can be expanded and collapsed.
- bg
-
const Color? bg := null
Background color of tree, or null for platform default.
- border
-
const Bool border := true
Draw a border around the widget. Default is true. This field cannot be changed once the widget is constructed.
- hbar
-
@Transient
ScrollBar hbar := ... { private set }Horizontal scroll bar.
- isExpanded
-
Return the expanded state for this node.
- make
-
new make(|This|? f := null)
Default constructor.
- model
-
TreeModel model := TreeModel.<ctor>()
Backing data model of tree.
- multi
-
const Bool multi := false
True to enable multi-node selection, false for single node selection. Default is false. This field cannot be changed once the widget is constructed.
- nodeAt
-
Return the tree node at the specified coordinate relative to this widget. Return null if no node at given coordinate.
- onAction
-
EventListeners onAction()
Callback when node is double clicked or Return/Enter key is pressed.
Event id fired:
Event fields:
Event.data
: theTreeModel
node object
- onPopup
-
EventListeners onPopup()
Callback when user invokes a right click popup action. If the callback wishes to display a popup, then set the
Event.popup
field with menu to open. If multiple callbacks are installed, the first one to return a nonnull popup consumes the event.Event id fired:
Event fields:
Event.data
: the primary selection node object, ornull
if this is a background popup.Event.pos
: the mouse position of the popup.
- onSelect
-
EventListeners onSelect()
Callback when selected nodes change.
Event id fired:
Event fields:
Event.data
: the primary selection node object.
- refreshAll
-
Void refreshAll()
Update the entire tree's contents from the model.
- refreshNode
-
Update the specified node from the model.
- select
-
Select the given item in the tree.
- selected
-
Obj[] selected
Get and set the selected nodes.
- setExpanded
-
Void setExpanded(Obj node, Bool expanded)
Set the expanded state for this node.
- show
-
Shows the node. If the node is already showing in the tree, this method simply returns. Otherwise, the items are scrolled and expanded until the node is visible
- vbar
-
@Transient
ScrollBar vbar := ... { private set }Vertical scroll bar.