csheets.ext.deptree
Class PrecedentsNode

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

public class PrecedentsNode
extends CellNode

A tree node for a cell, to which the cell's precedents are added dynamically when the node is expanded.

Author:
Einar Pehrson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class csheets.ext.deptree.CellNode
treeModel
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
PrecedentsNode(Cell cell, DefaultTreeModel treeModel, UIController uiController)
          Creates a new precedents node.
 
Method Summary
protected  void addChildren()
          Adds children to the node.
 boolean isLeaf()
          Returns whether the cell has references.
 
Methods inherited from class csheets.ext.deptree.CellNode
getCell, populate
 
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, 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
 

Constructor Detail

PrecedentsNode

public PrecedentsNode(Cell cell,
                      DefaultTreeModel treeModel,
                      UIController uiController)
Creates a new precedents node.

Parameters:
cell - the cell of the node
treeModel - the data model to which the node belongs
uiController - the user interface controller
Method Detail

addChildren

protected void addChildren()
Description copied from class: CellNode
Adds children to the node. Invoked once, when the node is populated.

Specified by:
addChildren in class CellNode

isLeaf

public boolean isLeaf()
Returns whether the cell has references.

Specified by:
isLeaf in interface TreeNode
Overrides:
isLeaf in class DefaultMutableTreeNode
Returns:
true if the cell has references