com.jstatcom.project
Class ModuleTreeNode
- java.lang.Object
-
- javax.swing.tree.DefaultMutableTreeNode
-
- 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.DefaultMutableTreeNodeA tree node that represents a loaded JStatCom module. It is used by the project tree component.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddoAction()Invokes the underlying action.java.lang.StringgetName()Gets the module name.java.lang.StringtoString()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
-
-
-
-
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 parameteraction.- Parameters:
action- the action to be invoked in thedoActionmethod- 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:
toStringin classjavax.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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG