Method Summary |
|
native public void | addListener(NodeListener listener) Add a Node listener. |
native public void | appendChild(Node child) Insert node as the last child node of this node. |
native public void | bubble(NodeTraversalCallback cb) Bubbles up the tree from this node, calling the specified function with each node. |
native public void | cascade(NodeTraversalCallback cb) Cascades down the tree from this node, calling the specified function with each node. |
native public boolean | contains(Node child) Returns true if this node is an ancestor (at any point) of the passed node. |
native protected JavaScriptObject | create(JavaScriptObject config) |
protected Node | createNode(JavaScriptObject jsNode) |
native public void | eachChild(NodeTraversalCallback cb) Interates the child nodes of this node, calling the specified function with each node. |
public boolean | equals(Object o) |
native public Node | findChildBy(NodeTraversalCallback cb) Finds the first child by a custom callback function. |
native public String | getAttribute(String name) Returns a node's attribute as String. |
native public Object | getAttributeAsObject(String name) Returns a node's Object attribute. |
public Node[] | getChildNodes() Returns all child nodes of this node. |
native public int | getDepth() Returns depth of this node (the root node has a depth of 0). |
native public Node | getFirstChild() Return the first direct child node of this node, or null if this node has no child nodes. |
native public String | getId() Return the node's ID. |
public JavaScriptObject | getJsObj() |
native public Node | getLastChild() return the last direct child node of this node, or null if this node has no child nodes. |
native public Node | getNextSibling() Return the node immediately following this node in the tree, or null if there is no sibling node. |
native public Tree | getOwnerTree() Returns the tree this node is in. |
native public Node | getParentNode() The parent node for this node. |
native public String | getPath() Returns the path for this node. |
native public String | getPath(String attr) Returns the path for this node. |
native public Node | getPreviousSibling() Return the node immediately preceding this node in the tree, or null if there is no sibling node. |
public Object | getUserObject() |
public int | hashCode() |
native public int | indexOf(Node child) Returns the index of a child node. |
native public Node | insertBefore(Node node, Node nodeRef) Inserts the first node before the second node in this nodes childNodes collection. |
native public boolean | isAncestor(Node node) Returns true if the passed node is an ancestor (at any point) of this node. |
native public boolean | isFirst() Returns true if this node is the first child of its parent. |
native public boolean | isLast() Returns true if this node is the last child of its parent. |
native public boolean | isLeaf() Returns true if this node is a leaf. |
native public Node | item(int index) Returns the child node at the specified index. |
native public void | remove() Removes this node from it's parent. |
native public Node | removeChild(Node child) Removes a child node from this node. |
native public Node | replaceChild(Node newChild, Node oldChild) Replaces one child node in this node with another. |
native public void | setAttribute(String name, Object value) Sets a attribute on the node. |
native public void | setAttribute(String name, String value) Sets a attribute on the node. |
native protected void | setAttribute(String name, JavaScriptObject value) |
public void | setId(String id) Set the Node's ID. |
public void | setLeaf(boolean leaf) Sets whether the node is a leaf. |
public void | setUserObject(Object userObject) Associate a user defined Object with the node. |
native public void | sort(Comparator c) Sorts this nodes children using the supplied sort function. |