com.jstatcom.project
Class ModuleTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by com.jstatcom.project.ModuleTreeNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public final class ModuleTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

A tree node that represents a loaded JStatCom module. It is used by the project tree component.

Author:
Markus Kraetzig
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
EMPTY_ENUMERATION
 
Constructor Summary
ModuleTreeNode(javax.swing.AbstractAction action)
          Creates a module tree node with an action that is invoked from the project tree it belongs to.
 
Method Summary
 void doAction()
          Invokes the underlying action.
 java.lang.String getName()
          Gets the module name.
 java.lang.String toString()
          Gets the string representation of this.
 
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, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleTreeNode

public ModuleTreeNode(javax.swing.AbstractAction action)
Creates a module tree node with an action that is invoked from the project tree it belongs to. All information about the represented module is retrieved from the parameter action.

Parameters:
action - the action to be invoked in the doAction method
Throws:
java.lang.IllegalArgumentException - if (action == null)
Method Detail

getName

public java.lang.String getName()
Gets the module name. It is retrieved from the underlying action.

Returns:
module name

toString

public java.lang.String toString()
Gets the string representation of this.

Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode
Returns:
descriptive string, used by display

doAction

public void doAction()
Invokes the underlying action. Used by project tree on a mouse click over this node.