|
» Component » Label » Button » CheckBox » ComboBox » TextField » PasswordField » TextArea » TabbedPane » Panel » Desktop » Dialog » SpinBox » ProgressBar » Slider » SplitPane » List » Table » Tree » Separator » MenuBar
|
|
|
Tree
Tree displays a set of hierarchical data, contains nodes
(not only one root node is allowed), and a node could have subnodes.
It internally handles scrolling.
The following example shows a tree with 2 root nodes ('Node A', and 'Node D'),
the first has 2 subnodes (a selected 'Node B' and 'Node C'), the collapsed
'Node D' includes one node.
<tree selection="multiple">
<node text="Node A" icon="image.gif">
<node text="Node B" icon="image.gif" selected="true" />
<node text="Node C" icon="image.gif" />
</node>
<node text="Node D" expanded="false">
<node text="Node E" icon="image.gif" />
</node>
</tree> |
Parameters
Name | Type | Default | Description | selection | choice | single |
Possible values are: single, interval, and multiple. For the default
single value the selection can only contain one path at a time,
for interval the selection can only be contiguous (of the currently
visible nodes), and for the multiple value the selection can contain
any number of nodes that are not necessarily contiguous.
|
action | method | null |
Calls the method whenever the selection changes.
|
expand | method | null |
The listener that's notified when the tree expands a node.
|
collapse | method | null |
Called whenever a node in the tree has been collapsed.
|
name, enabled, visible, tooltip, width, height, colspan, rowspan,
weightx, weighty, halign, and valign parameters are similar to component
|
Node
Tree node is similar to list item, but maybe contains subnodes, and has
collapse control.
Parameters
Name | Type | Default | Description | selected | boolean | false |
True if currently selected.
|
expanded | boolean | true |
Ensures that the node is expanded if true, otherwise collapsed.
|
name, enabled, text, icon, and alignment parameters are similar to combobox choice
|
Keyboard-actions
Operation | Action | Right arrow | Expands current collapsed node, or selects its first subnode |
Left arrow | Collapses current expanded node, or selects its parent node |
Up arrow | Selects previous node |
Down arrow | Selects next node |
Home | Selects first node |
End | Selects last node |
Page Up | Selects node one view up |
Page Down | Selects node one view down |
+Shift | Extends selection |
+Ctrl | Set lead node |
Space | Selects lead node |
Ctrl-A, Ctrl-Slash | Selects all |
Ctrl-Backslash | Deselects all |
Tab, Shift-Tab | Navigate forward, backward |
|