csheets.ext.deptree
Class CellNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by csheets.ext.deptree.CellNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode
Direct Known Subclasses:
DependentsNode, PrecedentsNode

public abstract class CellNode
extends DefaultMutableTreeNode

A tree node for a cell, to which child nodes are added dynamically when the node is expanded.

Author:
Einar Pehrson
See Also:
Serialized Form

Field Summary
protected  DefaultTreeModel treeModel
          The data model to which the node belongs
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
CellNode(Cell cell, DefaultTreeModel treeModel)
          Creates a new cell node.
 
Method Summary
protected abstract  void addChildren()
          Adds children to the node.
 Cell getCell()
          Returns the cell of the node.
 void populate()
          Populates the cell node by adding child nodes for all its references.
 
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, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

treeModel

protected DefaultTreeModel treeModel
The data model to which the node belongs

Constructor Detail

CellNode

public CellNode(Cell cell,
                DefaultTreeModel treeModel)
Creates a new cell node.

Parameters:
cell - the cell of the node
treeModel - the data model to which the node belongs
Method Detail

getCell

public Cell getCell()
Returns the cell of the node.

Returns:
the cell of the node.

populate

public void populate()
Populates the cell node by adding child nodes for all its references.


addChildren

protected abstract void addChildren()
Adds children to the node. Invoked once, when the node is populated.