Roo.util.Observable Roo.data.Node
Package: | Roo.data |
Defined In: | Roo/data/Tree.js. |
Class: | Node |
Subclasses: | Roo.tree.AsyncTreeNode, Roo.tree.TreeNode |
Extends: | Roo.util.Observable |
Options | Defined By | |
---|---|---|
id : String
The id for this node.
The id for this node. If one is not specified, one is generated.
|
Roo.data.Node | |
leaf : Boolean
true if this node is a leaf and does not have children
true if this node is a leaf and does not have children
|
Roo.data.Node | |
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable |
Method | Defined By | |
---|---|---|
new Roo.data.Node
(Object attributes)
Create a new Roo.data.Node
Create a new Roo.data.Node
|
||
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
appendChild
(Node/Array node)
:
Node
Insert node(s) as the last child node of this node.
Insert node(s) as the last child node of this node.
|
Roo.data.Node | |
Bubbles up the tree from this node, calling the specified function with each node.
Bubbles up the tree from this node, calling the specified function with each node. The scope (this) of
function call will be the scope provided or the current node. The arguments to the function will be the args provided or the current node. If the function returns false at any point, the bubble is stopped. |
Roo.data.Node | |
Cascades down the tree from this node, calling the specified function with each node.
Cascades down the tree from this node, calling the specified function with each node. The scope (this) of
function call will be the scope provided or the current node. The arguments to the function will be the args provided or the current node. If the function returns false at any point, the cascade is stopped on that branch. |
Roo.data.Node | |
contains
(Node node)
:
Boolean
Returns true if this node is an ancestor (at any point) of the passed node.
Returns true if this node is an ancestor (at any point) of the passed node.
|
Roo.data.Node | |
Interates the child nodes of this node, calling the specified function with each node.
Interates the child nodes of this node, calling the specified function with each node. The scope (this) of
function call will be the scope provided or the current node. The arguments to the function will be the args provided or the current node. If the function returns false at any point, the iteration stops. |
Roo.data.Node | |
findChild
(String attribute, Mixed value)
:
Node
Finds the first child that has the attribute with the specified value.
Finds the first child that has the attribute with the specified value.
|
Roo.data.Node | |
Roo.data.Node | ||
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
getDepth
()
:
Number
Returns depth of this node (the root node has a depth of 0)
Returns depth of this node (the root node has a depth of 0)
|
Roo.data.Node | |
getOwnerTree
()
:
Tree
Returns the tree this node is in.
Returns the tree this node is in.
|
Roo.data.Node | |
Roo.data.Node | ||
Roo.util.Observable | ||
indexOf
(Node node)
:
Number
Returns the index of a child node
Returns the index of a child node
|
Roo.data.Node | |
insertBefore
(Node node, Node refNode)
:
Node
Inserts the first node before the second node in this nodes childNodes collection.
Inserts the first node before the second node in this nodes childNodes collection.
|
Roo.data.Node | |
isAncestor
(Node node)
:
Boolean
Returns true if the passed node is an ancestor (at any point) of this node.
Returns true if the passed node is an ancestor (at any point) of this node.
|
Roo.data.Node | |
isFirst
()
:
Boolean
Returns true if this node is the first child of its parent
Returns true if this node is the first child of its parent
|
Roo.data.Node | |
isLast
()
:
Boolean
Returns true if this node is the last child of its parent
Returns true if this node is the last child of its parent
|
Roo.data.Node | |
isLeaf
()
:
Boolean
Returns true if this node is a leaf
Returns true if this node is a leaf
|
Roo.data.Node | |
item
(Number index)
:
Node
Returns the child node at the specified index.
Returns the child node at the specified index.
|
Roo.data.Node | |
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
removeChild
(Node node)
:
Node
Removes a child node from this node.
Removes a child node from this node.
|
Roo.data.Node | |
Roo.util.Observable | ||
replaceChild
(Node newChild, Node oldChild)
:
Node
Replaces one child node in this node with another.
Replaces one child node in this node with another.
|
Roo.data.Node | |
Roo.data.Node | ||
Roo.util.Observable |
Event | Defined By | |
---|---|---|
append (Tree tree, Node this, Node node, Number index)
Fires when a new child node is appended
Fires when a new child node is appended
|
Roo.data.Node | |
beforeappend (Tree tree, Node this, Node node)
Fires before a new child is appended, return false to cancel the append.
Fires before a new child is appended, return false to cancel the append.
|
Roo.data.Node | |
beforeinsert (Tree tree, Node this, Node node, Node refNode)
Fires before a new child is inserted, return false to cancel the insert.
Fires before a new child is inserted, return false to cancel the insert.
|
Roo.data.Node | |
beforemove (Tree tree, Node this, Node oldParent, Node newParent, Number index)
Fires before this node is moved to a new location in the tree.
Fires before this node is moved to a new location in the tree. Return false to cancel the move.
|
Roo.data.Node | |
beforeremove (Tree tree, Node this, Node node)
Fires before a child is removed, return false to cancel the remove.
Fires before a child is removed, return false to cancel the remove.
|
Roo.data.Node | |
insert (Tree tree, Node this, Node node, Node refNode)
Fires when a new child node is inserted.
Fires when a new child node is inserted.
|
Roo.data.Node | |
move (Tree tree, Node this, Node oldParent, Node newParent, Number index)
Fires when this node is moved to a new location in the tree
Fires when this node is moved to a new location in the tree
|
Roo.data.Node | |
remove (Tree tree, Node this, Node node)
Fires when a child node is removed
Fires when a child node is removed
|
Roo.data.Node |