SMACS

smacs.xngr.browser.explorer
Class CategoryNode

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended bysmacs.xngr.browser.explorer.ExplorerNode
          extended bysmacs.xngr.browser.explorer.CategoryNode
All Implemented Interfaces:
Cloneable, Comparable, MutableTreeNode, Serializable, TreeNode

public class CategoryNode
extends ExplorerNode

The default node for categories.

Author:
Edwin Dankert
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
CategoryNode(DocumentCategory category)
          The constructor for a category node.
 
Method Summary
 DocumentCategory getCategory()
          Gets the document category for this node.
 CategoryNode getCategoryNode(DocumentCategory category)
          Gets the a node for the document category.
 String getDescription()
          Gets the description for this node.
 ImageIcon getIcon()
          Gets the default category icon for this node.
 String getName()
          Gets the name for this node.
 ImageIcon getSelectedIcon()
          Gets the selected category icon for this node.
 void setName(String name)
          Sets the name for this node.
 void setUserObject(Object object)
          Sets the user object for the category.
 
Methods inherited from class smacs.xngr.browser.explorer.ExplorerNode
add, compareTo
 
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, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CategoryNode

public CategoryNode(DocumentCategory category)
The constructor for a category node.

Parameters:
category - the document category for the node.
Method Detail

getCategory

public DocumentCategory getCategory()
Gets the document category for this node.

Returns:
the category.

getCategoryNode

public CategoryNode getCategoryNode(DocumentCategory category)
Gets the a node for the document category.

Parameters:
category - the DocumentCategory.
Returns:
the node, or null if not found.

setName

public void setName(String name)
Sets the name for this node.

Parameters:
name - the new name.

setUserObject

public void setUserObject(Object object)
Sets the user object for the category.

Parameters:
object - the new name.

getName

public String getName()
Gets the name for this node.

Specified by:
getName in class ExplorerNode
Returns:
the name.

getDescription

public String getDescription()
Gets the description for this node. This description is used for the tooltip text.

Specified by:
getDescription in class ExplorerNode
Returns:
the description.

getSelectedIcon

public ImageIcon getSelectedIcon()
Gets the selected category icon for this node.

Specified by:
getSelectedIcon in class ExplorerNode
Returns:
the selected category icon.

getIcon

public ImageIcon getIcon()
Gets the default category icon for this node.

Specified by:
getIcon in class ExplorerNode
Returns:
the category icon.

SMACS