| |
|
| java.lang.Object ob.tree.TreeNode
All known Subclasses: ob.tree.TreeNodeX,
TreeNode | public class TreeNode implements Serializable(Code) | | The TreeNode class is the lowest level class used to manipulate a tree node.
|
TREENODE_FIRST | final public static int TREENODE_FIRST(Code) | | |
TREENODE_LAST | final public static int TREENODE_LAST(Code) | | |
TREENODE_SORT | final public static int TREENODE_SORT(Code) | | |
addChild | public boolean addChild(TreeNode pNewTreeNode)(Code) | | adds a child
Parameters: pNewTreeNode - adds a new child |
addChild | public boolean addChild(TreeNode pNewTreeNode, int pInsAfter)(Code) | | add a child
Parameters: pNewTreeNode - new tree node to add Parameters: pInsAfter - the node to insert after true if successfully added, otherwise false |
addChild | public boolean addChild(TreeNode pNewTreeNode, TreeNode pInsAfter)(Code) | | adds a child to the tree
Parameters: pNewTreeNode - new item to add Parameters: pInsAfter - adds after this item true if successfully added, otherwise false |
collapse | public void collapse()(Code) | | collapse the node
|
deleteAllChildren | public void deleteAllChildren()(Code) | | detaches all this nodes children from the tree
|
deleteChildren | public void deleteChildren()(Code) | | currently not implemented
|
detachFromTree | public void detachFromTree()(Code) | | detaches from the tree
|
expand | public void expand(boolean bExpand)(Code) | | virtual method to determine if node is expanded or not
Parameters: bExpand - true if you wish to expand, false to collapse |
expand | public void expand()(Code) | | expand the node
|
getBottomLeftChild | public TreeNode getBottomLeftChild()(Code) | | retrieves the bottom left child
bottom left child as type TreeNode |
getBottomRightChild | public TreeNode getBottomRightChild()(Code) | | retrieves the bottom right child
bottom right child as type TreeNode |
getDistanceFromRoot | public int getDistanceFromRoot()(Code) | | determines how many levels down the node is from the root
distance from root as type int |
getFirstChild | public TreeNode getFirstChild()(Code) | | retrieves the first child node
Parameters: first - child node as type TreeNode |
getFirstSibling | public TreeNode getFirstSibling()(Code) | | retrieves the first sibling node
first sibling as type TreeNode |
getLastChild | public TreeNode getLastChild()(Code) | | retrieves the last child node
last child node as type TreeNode |
getLastSibling | public TreeNode getLastSibling()(Code) | | retrieves the last sibling as type TreeNode
last sibling as type TreeNode |
getNextInDisplayOrder | public TreeNode getNextInDisplayOrder()(Code) | | retrieves next node in the display
next in display as type TreeNode |
getNextSibling | public TreeNode getNextSibling()(Code) | | retrieves the next sibling
next sibling as type TreeNode |
getNumDescendents | public int getNumDescendents()(Code) | | how many total descendents fall under this node
number of descendents |
getParent | public TreeNode getParent()(Code) | | retrieves the parent node
parent as type TreeNode |
getPrevInDisplayOrder | public TreeNode getPrevInDisplayOrder()(Code) | | retrieves the previous node in the display
previous node as type TreeNode |
getPrevSibling | public TreeNode getPrevSibling()(Code) | | retrieves the previous sibling
Parameters: previous - sibling as type TreeNode |
getRoot | public TreeNode getRoot()(Code) | | retrieves the root node
root as type TreeNode |
hasChildren | public boolean hasChildren()(Code) | | determines if node has children
true if children exist, otherwise false |
isAncestor | public boolean isAncestor(TreeNode possibleAncestor)(Code) | | determines whether this node is an ancestor of the node passed in
Parameters: possibleAncestor - TreeNode to check against true if it is an ancestor, otherwise false |
isDescendant | public boolean isDescendant(TreeNode pNode)(Code) | | determines whether this node is a descendent of the node passed in
Parameters: pNode - the node to check if it is a descendant true if descendant, otherwise false |
isExpanded | public boolean isExpanded()(Code) | | virtual method to determine if node is expanded or not
|
isParent | public boolean isParent(TreeNode parent)(Code) | | determines whether the node contains children nodes
true if children exist, otherwise false |
isSibling | public boolean isSibling(TreeNode pNodeTest)(Code) | | determines whether the node is a sibling of the TreeNode passed in
Parameters: pNodeTest - TreeNode to test whether it is a sibling or not true if it is a sibling, otherwise false |
onNextSearchNode | public boolean onNextSearchNode(int idSearch, TreeNode pNode)(Code) | | overridable function for searching
Parameters: idSearch - id to search for Parameters: pNode - node to start search from true if found |
search | public TreeNode search(int idSearch)(Code) | | search for the id
Parameters: idSearch - id to search for item as type TreeNode |
setFirstChild | public void setFirstChild(TreeNode n)(Code) | | sets first child
Parameters: n - first child |
setNextSibling | public void setNextSibling(TreeNode n)(Code) | | sets next sibling
Parameters: n - next sibling |
setParent | public void setParent(TreeNode n)(Code) | | sets parent to node
Parameters: n - parent node to set |
setPrevSibling | public void setPrevSibling(TreeNode n)(Code) | | sets previous sibling
Parameters: n - previous sibling |
|
|
|