Home

# Class goog.ui.tree.TreeControl

This creates a TreeControl object. A tree control provides a way to view a hierarchical set of data.

extends goog.ui.tree.BaseNode

Instance Method Summary
| `attachEvents_()` Adds the event listeners to the tree.
| `clearTypeAhead()` Clear the typeahead buffer.
| `createNode(string html) ⇒ ?goog.ui.tree.TreeNode` Creates a new tree node using the same config as the root.
| `detachEvents_()` Removes the event listeners from the tree.
| `enterDocument()` Called when the component's element is known to be in the document. Anything using document.getElementById etc. should be done at this stage. If the component contains child components, this call is propagated to its children.
| `exitDocument()` Called by dispose to clean up the elements and listeners created by a component, or by a parent component/application who has removed the component from the document but wants to reuse it later. If the component contains child components, this call is propagated to its children. It should be possible for the component to be rendered again once this method has been called.
| `getCalculatedIconClass() ⇒ string` Returns the source for the icon.
| `getDepth() ⇒ number` Returns the depth of the node in the tree. Should not be overridden.
| `getExpandIconElement() ⇒ ?Element`
| `getExpandIconHtml() ⇒ string`
| `getExpanded() ⇒ boolean`
| `getIconElement() ⇒ ?Element`
| `getNodeFromEvent_(!goog.events.BrowserEvent e) ⇒ ?goog.ui.tree.BaseNode` Finds the containing node given an event.
| `getRowClassName() ⇒ string`
| `getSelectedItem() ⇒ ?goog.ui.tree.BaseNode` Returns the selected item.
| `getShowExpandIcons() ⇒ boolean`
| `getShowLines() ⇒ boolean`
| `getShowRootLines() ⇒ boolean`
| `getShowRootNode() ⇒ boolean`
| `getTree()` Returns the tree.
| `handleBlur_(!goog.events.BrowserEvent e)` Handles blur on the tree.
| `handleFocus_(!goog.events.BrowserEvent e)` Handles focus on the tree.
| `handleKeyEvent(!goog.events.BrowserEvent e) ⇒ boolean` Handles key down on the tree.
| `handleMouseEvent_(!goog.events.BrowserEvent e)` Handles mouse events.
| `hasFocus() ⇒ boolean`
| `initAccessibility()` Add roles and states.
| `removeNode(?goog.ui.tree.BaseNode node)` Allows the caller to notify that the given node is being removed from the tree.
| `reveal()` Expands the parent chain of this node so that it is visible.
| `setExpanded(boolean expanded)` Sets the node to be expanded.
| `setNode(?goog.ui.tree.BaseNode node)` Allows the caller to notify that the given node has been added or just had been updated in the tree.
| `setSelectedItem(?goog.ui.tree.BaseNode node)` Sets the selected item.
| `setShowExpandIcons(boolean b)` Sets whether to show expand icons.
| `setShowLines(boolean b)` Sets whether to show lines.
| `setShowRootLines(boolean b)` Sets whether to show root lines.
| `setShowRootNode(boolean b)` Sets whether to show the root node.
| `updateExpandIcon()` Updates the expand icon of the node.
| `updateLinesAndExpandIcons_()` Updates the lines after the tree has been drawn.