package bluej.parser.nodes;


| An RBTreeNode represents the value in a tree node represented by a NodeTree. | | @author Davin McCall | public class RBTreeNode<T extends RBTreeNode<T>>{ private NodeTree<T> containingNodeTree;
| Set the containing node tree. This is normally only called by NodeTree when inserting | this node into the tree. | protected final void setContainingNodeTree(NodeTree<T> cnode) { containingNodeTree = cnode; }
| Get the containing node tree for this node. | @return | protected final NodeTree getContainingNodeTree() { return containingNodeTree; }
| Move the node. This also has the effect of moving all following nodes. | @param offset The amount by which to move the node | public void slide(int amount) { getContainingNodeTree().slideNode(amount); }
| Move the node's beginning, but not its end position. This shrinks or grows | the node accordingly. The position of following nodes is not affected. | public void slideStart(int offset) { getContainingNodeTree().slideStart(offset); }
| Set the size of this node. Following nodes shift position according to the change in | size; this should normally be used when inserting or removing text from the node. | @param newSize The new node size | public void resize(int newSize) { getContainingNodeTree().resize(newSize); }
| Set the size of this node, without moving following nodes. It is the caller's | responsibility to ensure that setting the new size does not cause this node | to overlap following nodes. | @param newSize The new size of this node. | public void setSize(int newSize) { getContainingNodeTree().setSize(newSize); } public void remove() { getContainingNodeTree().remove(); } }

.   setContainingNodeTree
.   getContainingNodeTree
.   slide
.   slideStart
.   resize
.   setSize
.   remove




64 neLoCode + 17 LoComm