borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.model
java.lang.Object +----borland.jbcl.model.LinkedTreeNode
Variables Constructors Properties Methods
Implements GraphLocation
A LinkedTreeNode object is the item container for use with LinkedTreeContainer. It contains the properties and methods needed to function as a node on a tree.
protected int childCountA variable that holds the number of children this node has.
protected LinkedTreeNode firstChildThe LinkedTreeNode object that is the immediate descendant of this node.
protected LinkedTreeNode nextSiblingThe LinkedTreeNode object that is the next sibling of this node in the tree hierarchy.
protected LinkedTreeNode parentThe LinkedTreeNode object that is the parent of this node.
public LinkedTreeNode()Constructs a LinkedTreeNode object with default property values, and with the current object as its parent.
public LinkedTreeNode(borland.jbcl.model.LinkedTreeNode parent)Constructs a LinkedTreeNode object as a child of the node passed as the parent argument. If parent is null, the new node is the root of the tree.
Parameters:
public ForwardIterator getChildIterator()Returns an iterator over the children of this node.
public GraphLocation[] getChildren()Returns the children of this node.
public LinkedTreeNode getFirstChild()Returns the first child of this node.
public LinkedTreeNode getNextSibling()Returns the next sibling of this node.
public GraphLocation getParent()Returns the parent of this node.
public void appendChild(borland.jbcl.model.LinkedTreeNode newChild)Adds a node at the end of the chain of children of this node.
Parameters:
public void check()A method that checks the validity of the position of the node in the tree. If the node is not the parent of its designated children, an IllegalStateException is thrown. Also, if the first child node is equal to that node's next sibling, an IllegalStateException is thrown. This method is intended as a debugging aid.
protected void doAddChild(borland.jbcl.model.LinkedTreeNode newChild, borland.jbcl.model.LinkedTreeNode aheadOf)Adds a new node to the node chain. doAddChild() is called by the appendChild() and the insertChild() methods.
Parameters:
public void insertChild(borland.jbcl.model.LinkedTreeNode newChild)Adds a node chain in front of the first child of this node. The inserted node becomes the first child.
Parameters:
public void insertChild(borland.jbcl.model.LinkedTreeNode newChild, borland.jbcl.model.LinkedTreeNode aheadOf)Inserts a node in this node's child chain. The node is added in front of the specified child of this node.
Parameters:
public void insertSibling(borland.jbcl.model.LinkedTreeNode newSibling)Inserts a node chain in front of the first sibling of this node.
Parameters:
public void print()Prints the node chain beginning at the root. This method is intended as a debugging aid.
public void print(int level)Prints all nodes at the specified level and all their children. This method is intended as a debugging aid.
public void removeChild(borland.jbcl.model.LinkedTreeNode unwantedChild)Removes a single child from this node's chain of children.
Parameters:
public LinkedTreeNode removeNode(borland.jbcl.model.LinkedTreeNode root)Removes this node from its tree, returning the root node. The root node is passed to this method as removing this node from the tree might require an adjustment to the root node. So the root node returned might differ from the one passed to the method.
Parameters:
protected void setParent(borland.jbcl.model.LinkedTreeNode parent)Sets this node's parent node.
Parameters: