de.matthias_burbach.mosaique.swing
Class BaseMutableTreeNode

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byde.matthias_burbach.mosaique.swing.BaseMutableTreeNode
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode
Direct Known Subclasses:
AbstractFileItemNode

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  void assertChildrenAreInitialized()
          Initializes this object if it hasn't been yet.
protected  boolean childrenAreInitialized()
           
 int getChildCount()
          
 java.lang.Object[] getChildren()
          Introduced to support usage of this class in the Eclipse context.
protected abstract  void initChildren()
          Initializes the children nodes of this node.
 boolean isErroneous()
           
 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()


getChildren

public java.lang.Object[] getChildren()
Introduced to support usage of this class in the Eclipse context.

Returns:
The child notes of this node.

isErroneous

public boolean isErroneous()
Returns:
Signals that the node has discovered an error related to this node. Can be used to display the error state, for example. The default returned is false. Can be overridden.

childrenAreInitialized

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

assertChildrenAreInitialized

protected void assertChildrenAreInitialized()
Initializes this object if it hasn't been yet.



Copyright © 2005-2006 . All Rights Reserved.