Clear Up
SharpKit Reference

Tree Class

Namespace: Ext.data

Base Types

System.Object

Constructors

Name Description
Tree()
Tree(NodeInterface) Creates new Tree object. @param {Ext.data.NodeInterface} root (optional) The root node

Properties

Name Description
alias @class Ext.data.Tree * This class is used as a container for a series of nodes. The nodes themselves maintain the relationship between parent/child. The tree itself acts as a manager. It gives functionality to retrieve a node by its identifier: {@link #getNodeById}. * The tree also relays events from any of it's child nodes, allowing them to be handled in a centralized fashion. In general this class is not used directly, rather used internally by other parts of the framework. *
root @property {Ext.data.NodeInterface} The root node for this tree
RootNode Sets the root node for this tree. @param {Ext.data.NodeInterface} node @return {Ext.data.NodeInterface} The root node

Methods

Name Description
filter(JsAction, bool) Filters this tree @private @param {Function} sorterFn The function to use for filtering @param {Boolean} recursive True to perform recursive filtering
flatten() Flattens all the nodes in the tree into an array. @private @return {Ext.data.NodeInterface[]} The flattened nodes.
getNodeById(JsString) Gets a node in this tree by its id. @param {String} id @return {Ext.data.NodeInterface} The match node.
getRootNode() Returns the root node for this tree. @return {Ext.data.NodeInterface}
onNodeAppend(NodeInterface, NodeInterface) Fired when a node is appended into the root or one of it's children @private @param {Ext.data.NodeInterface} parent The parent node @param {Ext.data.NodeInterface} node The appended node
onNodeInsert(NodeInterface, NodeInterface) Fired when a node is inserted into the root or one of it's children @private @param {Ext.data.NodeInterface} parent The parent node @param {Ext.data.NodeInterface} node The inserted node
onNodeRemove(NodeInterface, NodeInterface) Fired when a node is removed from the root or one of it's children @private @param {Ext.data.NodeInterface} parent The parent node @param {Ext.data.NodeInterface} node The removed node
registerNode(NodeInterface) Registers a node with the tree @private @param {Ext.data.NodeInterface} The node to register
setRootNode(NodeInterface) Sets the root node for this tree. @param {Ext.data.NodeInterface} node @return {Ext.data.NodeInterface} The root node
sort(JsAction, bool) Sorts this tree @private @param {Function} sorterFn The function to use for sorting @param {Boolean} recursive True to perform recursive sorting
unregisterNode(NodeInterface) Unregisters a node with the tree @private @param {Ext.data.NodeInterface} The node to unregister
© Copyright 2005-2011 SharpKit. All rights reserved.