org.jurvis.swing.explorer
Interface JvExplorerNode

All Superinterfaces:
MutableTreeNode, TreeNode
All Known Implementing Classes:
JvDefaultExplorerNode, JvDefaultExplorerRoot

public interface JvExplorerNode
extends MutableTreeNode

Interface defining a node of the hierarchial data displayed by a JvExplorer. This node is essentially a JvDynamicTreeNode with some special features including per-node icons.

Author:
Neil W. Weber
See Also:
JvExplorer, JvExplorerModel

Method Summary
 void add(MutableTreeNode newChild)
          Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
 Icon getIcon()
          Return the node's icon.
 TreeNode[] getPath()
          Returns the path from the root, to get to this node.
 String getPathName()
          Return the complete path name of this node from the root.
 JvExplorerModel getTreeModel()
          Returns the JvExplorerModel containing this node.
 Object getUserObject()
          Returns this node's user object.
 void setIcon(Icon icon)
          Set the icon to be displayed for this node.
 
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
 

Method Detail

getTreeModel

JvExplorerModel getTreeModel()
Returns the JvExplorerModel containing this node.

Returns:
the JvExplorerModel containing this node

getPath

TreeNode[] getPath()
Returns the path from the root, to get to this node. The last element in the path is this node.

Returns:
an array of TreeNode objects giving the path, where the first element in the path is the root and the last element is this node.

getPathName

String getPathName()
Return the complete path name of this node from the root.

Returns:
the textual representation of this node's path from the root

add

void add(MutableTreeNode newChild)
Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.

Parameters:
newChild - node to add as a child of this node

getUserObject

Object getUserObject()
Returns this node's user object.

Returns:
the Object stored at this node by the user

setIcon

void setIcon(Icon icon)
Set the icon to be displayed for this node.

Parameters:
icon - the node's icon

getIcon

Icon getIcon()
Return the node's icon.

Returns:
the node's icon


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