anecho.gui
Class EasyIconTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by anecho.gui.EasyIconTreeNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Direct Known Subclasses:
World

public class EasyIconTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

The class is an extension of the DefaultMutableTreeNode that allows the programmer to easily assign an icon to it.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
EasyIconTreeNode()
           
 
Method Summary
 javax.swing.Icon getIcon()
          Returns the icon assigned to this node.
 void setIcon(javax.swing.Icon iconName)
          Set the icon for this node.
 
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, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EasyIconTreeNode

public EasyIconTreeNode()
Method Detail

setIcon

public void setIcon(javax.swing.Icon iconName)
Set the icon for this node.

Parameters:
iconName - The icon file to be used for this node.

getIcon

public javax.swing.Icon getIcon()
Returns the icon assigned to this node.

Returns:
The icon assigned to this node. This value may be null if an icon has not yet been assigned.