Class TreeOfCodeGUI.TreeNodeForCS

  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by codesimian.TreeOfCodeGUI.TreeNodeForCS
All Implemented Interfaces:, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Enclosing class:

public static class TreeOfCodeGUI.TreeNodeForCS
extends javax.swing.tree.DefaultMutableTreeNode

User-object (getUserObject()) can be any Object to put in a tree. If its a CS, the String is different than CS.toString(). Other than that, TreeNodeForCS is the same as DefaultMutableTreeNode.

See Also:
Serialized Form

Field Summary
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
Constructor Summary
TreeOfCodeGUI.TreeNodeForCS(java.lang.Object displayMeInTheTree)
Method Summary
 java.lang.String stringForCS(CS branchInTheTree)
          Returns a SHORT string describing a CS.
 java.lang.String toString()
          returns stringForCS(CS) or Object.toString()
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public TreeOfCodeGUI.TreeNodeForCS(java.lang.Object displayMeInTheTree)
Method Detail


public java.lang.String toString()
returns stringForCS(CS) or Object.toString()

toString in class javax.swing.tree.DefaultMutableTreeNode


public java.lang.String stringForCS(CS branchInTheTree)
Returns a SHORT string describing a CS. The string is not valid CodeSimian code. It contains only the info necessary for a Human to understand the CS when viewed in a tree with other TreeNodeForCSs. Example: for +(2 count *(4 5) 3), the string is "+(2 count *.. 3)".