A standard hierarchical tree widget. The tree contains a hierarchy of
TreeItems
that the user can open, close, and select.
The root item cannot be displayed.
Events: BeforeAdd : TreeEvent(item, child, index)
Fires before a item is added or inserted. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
- item : this
- child : the item being added
- index : the index at which the item will be added
BeforeRemove : TreeEvent(item, child)
Fires before a item is removed. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
- item : this
- child : the item being removed
BeforeExpand : TreeEvent(item)
Fires before a item is expanded. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
BeforeCollapse : TreeEvent(item)
Fires before a item is collapsed. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
Add : TreeEvent(item, child, index)
Fires after a item has been added or inserted.
- item : this
- child : the item that was added
- index : the index at which the item will be added
Remove : TreeEvent(tree, item, child)
Fires after a item has been removed.
- tree : this
- item : item
- child : the item being removed
BeforeSelect : TreeEvent(tree, item)
Fires before a item is selected. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
- tree : this
- item : the selected item
SelectionChange : TreeEvent(tree, selected)
Fires after the tree selection changes.
- tree : this
- selected : the selected items
Expand : TreeEvent(tree, item)
Fires after a item has been expanded.
Collapse : TreeEvent(tree, item)
Fires after a item is collapsed.
CheckChange : TreeEvent(tree, item)
Fires after a check state change.
ContextMenu : TreeEvent(tree)
Fires before the tree's context menu is shown.
KeyPress : TreeEvent(tree, event)
Fires when a key is pressed.
- Inherited Events:
- BoxComponent Move
- BoxComponent Resize
- Component Enable
- Component Disable
- Component BeforeHide
- Component Hide
- Component BeforeShow
- Component Show
- Component Attach
- Component Detach
- Component BeforeRender
- Component Render
- Component BrowserEvent
- Component BeforeStateRestore
- Component StateRestore
- Component BeforeStateSave
- Component SaveState
- CSS:
- .my-tree (the tree itself)
- .my-tree-item-text span (the tree item text)
@deprecated see {@link TreePanel}