Class Tree
Object
|
+--Widget
|
+--Container
|
+--Tree
- class
Tree
- extends Container
Raises:
selectionchanged- whenever the selection changes. Listeners are passed an
AbstractList of TreeNodes that are selected.
nodeexpanded- whenever a node with children is expanded to show its children. Listeners are passed the
TreeNode that expanded.
nodecollapsed- whenever a node with children is collapsed to hide its children. Listeners are passed the
TreeNode that collapsed.
nodedoubleclicked- whenever a node is double-clicked. Listeners are passed the
TreeNode that was double-clicked.
Defined in tree.js
|
Constructor Summary |
Tree
(<boolean> multiSelect)
Creates a tree widget.
|
| Methods inherited from class Container |
appendChild, clear, contains, insertAfter, insertAt, insertBefore, isEmpty, prependChild, removeChild, replaceChild, setLayout, setEnabled
|
| Methods inherited from class Widget |
installContextMenu, installDefaultContextMenu, uninstallContextMenu, isDraggable, setDraggable, addEventListener, createEventTable, dispose, getAbsoluteBottom, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getBottom, getBounds, getClientHeight, getClientWidth, getCorner, getHeight, getLeft, getPixelsPerEm, getRight, getToolTip, getTop, getWidth, isDisposed, isEnabled, layout, moveToAbsolute, moveTo, raiseEvent, registerEventType, removeEventListener, setAbsoluteBottom, setAbsoluteLeft, setAbsoluteRight, setAbsoluteTop, setBottom, setBounds, setHeight, setLeft, setRight, setToolTip, setTop, setWidth, setParent, toString
|
Tree
function Tree(<boolean> multiSelect)
Creates a tree widget. Trees are basically just containers that only expect
to have tree nodes appended to them as children. Appending other types of
widgets will cause visual bugs.
Parameters:
multiSelect - a boolean indicating whether or not multiple nodes can be selected in the tree. Defaults to false, which implies single-selection behaviour.
blur
void blur()
expandTo
void expandTo(<int> depth)
Parameters:
depth - the depth to which each of this tree's children should be expanded.
focus
void focus()
getSelection
AbstractList getSelection()
Returns:
the current selection as a list
setSelection
void setSelection(<WidgetList> selection)
Selects the TreeNodes in selection.
Parameters:
selection - a list containing TreeNodes to select
