de.matthias_burbach.deputy.swing
Class BaseMutableTreeNode

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byde.matthias_burbach.deputy.swing.BaseMutableTreeNode
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode
Direct Known Subclasses:
ConflictsTreeNode, ConflictTreeNode, DependenciesTreeNode, IndirectDependenciesTreeNode, ProjectTreeNode, RuleSetTreeNode, UsedByTreeNode

public abstract class BaseMutableTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

Is a base class for tree nodes which need to initialize child nodes explicitly and lazily.

Author:
Matthias Burbach
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
BaseMutableTreeNode()
           
 
Method Summary
protected  boolean childrenAreInitialized()
           
 int getChildCount()
          
protected  java.lang.String getSuffix(ProjectQualifier cause)
          Helper method to format the suffix to certain project names.
protected abstract  void initChildren()
          Initializes the children nodes of this node.
 boolean isLeaf()
          
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, 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

BaseMutableTreeNode

public BaseMutableTreeNode()
Method Detail

initChildren

protected abstract void initChildren()
Initializes the children nodes of this node.


getChildCount

public int getChildCount()


isLeaf

public boolean isLeaf()


childrenAreInitialized

protected boolean childrenAreInitialized()
Returns:
Whether children have already been initialized.

getSuffix

protected java.lang.String getSuffix(ProjectQualifier cause)
Helper method to format the suffix to certain project names.

Parameters:
cause - The qualifier of the project that has caused a relationship.
Returns:
The suffix to be appended to the project name in the tree node.


Copyright © 2005-2007 . All Rights Reserved.