org.jurvis.swing.explorer
Class JvDefaultExplorerRoot

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.jurvis.swing.tree.JvDynamicTreeNode
          extended by org.jurvis.swing.explorer.JvDefaultExplorerNode
              extended by org.jurvis.swing.explorer.JvDefaultExplorerRoot
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode, JvExplorerNode

public class JvDefaultExplorerRoot
extends JvDefaultExplorerNode

The root node of the hierarchial data displayed by a JvExplorer. This node is a JvDefaultExplorerNode with the additional knowledge of the containing TreeModel. It didn't make sense having each node storing the TreeModel, so I've created one special node that does. Every other node in the tree can obtain the TreeModel by querying its parent.

Author:
Neil W. Weber
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jurvis.swing.tree.JvDynamicTreeNode
wasQueried
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
JvDefaultExplorerRoot(Object userObject)
          Construct a JvDefaultExplorerRoot.
 
Method Summary
 JvExplorerModel getTreeModel()
          Returns the JvExplorerModel containing this node.
 void setTreeModel(JvExplorerModel treeModel)
          Sets the JvExplorerModel containing this node.
 
Methods inherited from class org.jurvis.swing.explorer.JvDefaultExplorerNode
getIcon, getPathName, setIcon
 
Methods inherited from class org.jurvis.swing.tree.JvDynamicTreeNode
children, doChildrenQuery, getChildAt, getChildCount, wasQueried
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, 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
 
Methods inherited from interface org.jurvis.swing.explorer.JvExplorerNode
add, getPath, getUserObject
 
Methods inherited from interface javax.swing.tree.MutableTreeNode
insert, remove, remove, removeFromParent, setParent, setUserObject
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Constructor Detail

JvDefaultExplorerRoot

public JvDefaultExplorerRoot(Object userObject)
Construct a JvDefaultExplorerRoot.

Parameters:
userObject - the object that constitutes the node's data
Method Detail

getTreeModel

public JvExplorerModel getTreeModel()
Returns the JvExplorerModel containing this node.

Specified by:
getTreeModel in interface JvExplorerNode
Overrides:
getTreeModel in class JvDefaultExplorerNode
Returns:
the JvExplorerModel containing this node

setTreeModel

public void setTreeModel(JvExplorerModel treeModel)
Sets the JvExplorerModel containing this node.

Parameters:
treeModel - the JvExplorerModel containing this node


Copyright © 1999-2004 Neil W. Weber. All Rights Reserved.