Represents a tree data structure and bubbles all the events for its nodes. The nodes
in the tree have most standard DOM functionality.
| |
Tree([Node root]) |
Tree |
|
| |
addEvents(Object object) : void |
Observable |
| Copies any events from the passed object onto this object if they do not already exist. The passed object
must also ... |
| |
addListener(String eventName, Function handler, [Object options]) : void |
Observable |
| Appends an event handler to this component |
| |
fireEvent(String eventName, Object... args) : Boolean |
Observable |
| Fires the specified event with the passed parameters (minus the event name). |
| |
getNodeById(String id) : Node |
Tree |
| Gets a node in this tree by its id |
| |
getRootNode() : Node |
Tree |
| Returns this root node for this tree |
| |
hasListener(String eventName) : Boolean |
Observable |
| Checks to see if this object is currently listening for a specified event |
| |
on(String eventName, Function handler, [Object options]) : void |
Observable |
| Appends an event handler to this element (shorthand for addListener) |
| |
purgeListeners() : void |
Observable |
| Removes all listeners for this object |
| |
removeListener(String eventName, Function handler, [Object scope]) : void |
Observable |
| Removes a listener |
| |
setRootNode(Node node) : Node |
Tree |
| Sets the root node for this tree |
| |
un(String eventName, Function handler, [Object scope]) : void |
Observable |
| Removes a listener (shorthand for removeListener) |
| |
append : (Tree tree, Node parent, Node node, Number index) |
Tree |
| Fires when a new child node is appended to a node in this tree. |
| |
beforeappend : (Tree tree, Node parent, Node node) |
Tree |
| Fires before a new child is appended to a node in this tree, return false to cancel the append. |
| |
beforeinsert : (Tree tree, Node parent, Node node, Node refNode) |
Tree |
| Fires before a new child is inserted in a node in this tree, return false to cancel the insert. |
| |
beforemove : (Tree tree, Node node, Node oldParent, Node newParent, Number index) |
Tree |
| Fires before a node is moved to a new location in the tree. Return false to cancel the move. |
| |
beforeremove : (Tree tree, Node parent, Node node) |
Tree |
| Fires before a child is removed from a node in this tree, return false to cancel the remove. |
| |
insert : (Tree tree, Node parent, Node node, Node refNode) |
Tree |
| Fires when a new child node is inserted in a node in this tree. |
| |
move : (Tree tree, Node node, Node oldParent, Node newParent, Number index) |
Tree |
| Fires when a node is moved to a new location in the tree |
| |
remove : (Tree tree, Node parent, Node node) |
Tree |
| Fires when a child node is removed from a node in this tree. |
append
public event append
Fires when a new child node is appended to a node in this tree.
Subscribers will be called with the following parameters:
This event is defined by Tree.
beforeappend
public event beforeappend
Fires before a new child is appended to a node in this tree, return false to cancel the append.
Subscribers will be called with the following parameters:
This event is defined by Tree.
beforeinsert
public event beforeinsert
Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
Subscribers will be called with the following parameters:
This event is defined by Tree.
beforemove
public event beforemove
Fires before a node is moved to a new location in the tree. Return false to cancel the move.
Subscribers will be called with the following parameters:
This event is defined by Tree.
beforeremove
public event beforeremove
Fires before a child is removed from a node in this tree, return false to cancel the remove.
Subscribers will be called with the following parameters:
This event is defined by Tree.
insert
public event insert
Fires when a new child node is inserted in a node in this tree.
Subscribers will be called with the following parameters:
This event is defined by Tree.
move
public event move
Fires when a node is moved to a new location in the tree
Subscribers will be called with the following parameters:
tree : TreeThe owner tree
node : NodeThe node moved
oldParent : NodeThe old parent of this node
newParent : NodeThe new parent of this node
index : NumberThe index it was moved to
This event is defined by Tree.
remove
public event remove
Fires when a child node is removed from a node in this tree.
Subscribers will be called with the following parameters:
tree : TreeThe owner tree
parent : NodeThe parent node
node : NodeThe child node removed
This event is defined by Tree.