org.exolab.jms.tools.admin
Class OpenJMSObject

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--org.exolab.jms.tools.admin.OpenJMSObject
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, OpenJMSNode, java.io.Serializable, javax.swing.tree.TreeNode
Direct Known Subclasses:
OpenJMSQueue, OpenJMSTopic, OpenJMSUser

public abstract class OpenJMSObject
extends javax.swing.tree.DefaultMutableTreeNode
implements OpenJMSNode

This is the base class for all nodes.

Version:
$Revision: 1.1 $ $Date: 2004/11/26 01:51:15 $
Author:
Jim Mourikis
See Also:
OpenJMSConsumer, AdminMgr, Serialized Form

Field Summary
protected  javax.swing.JPopupMenu _commands
           
protected  boolean _commandsCreated
           
protected static java.text.SimpleDateFormat _dateFormat
           
protected  boolean _isExplored
           
protected  boolean _isLeaf
           
protected  java.lang.String _name
           
protected static javax.swing.JTree _tree
           
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
OpenJMSObject(java.lang.String destinationName, javax.swing.JTree tree)
          The constructor gets its unique name for this object and a reference to its parent tree.
 
Method Summary
protected abstract  void createCommands()
          Create the menu for all objects and set up the Action events for each menu item.
 void displayCommands(java.awt.Rectangle loc)
          This node has been right clicked.
 boolean getAllowsChildren()
          Children are allowed for all objects
protected static OpenJMSObject getInstanceSelected()
          Get the particular instance of the object that has been selected.
 boolean isLeaf()
          Objects are leaves iff they have nothing registered against them.
protected  void refresh()
          This node has changed.
 java.lang.String toString()
          The unique name of this object.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, 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, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.exolab.jms.tools.admin.OpenJMSNode
update
 

Field Detail

_name

protected java.lang.String _name

_isLeaf

protected boolean _isLeaf

_isExplored

protected boolean _isExplored

_commands

protected javax.swing.JPopupMenu _commands

_commandsCreated

protected boolean _commandsCreated

_dateFormat

protected static java.text.SimpleDateFormat _dateFormat

_tree

protected static javax.swing.JTree _tree
Constructor Detail

OpenJMSObject

public OpenJMSObject(java.lang.String destinationName,
                     javax.swing.JTree tree)
The constructor gets its unique name for this object and a reference to its parent tree.

If this is the first call, the menu for all objects is created.

Parameters:
name - This object name.
tree - The parent tree this object belongs to.
Method Detail

createCommands

protected abstract void createCommands()
Create the menu for all objects and set up the Action events for each menu item. Since menus are shared, the callbacks called are static. Once a menu is slected, the slected node can be determined from the parent object.

getAllowsChildren

public boolean getAllowsChildren()
Children are allowed for all objects
Overrides:
getAllowsChildren in class javax.swing.tree.DefaultMutableTreeNode
Returns:
boolean Always returns true.

isLeaf

public boolean isLeaf()
Objects are leaves iff they have nothing registered against them.
Overrides:
isLeaf in class javax.swing.tree.DefaultMutableTreeNode
Returns:
boolean true if no objects are registered.

displayCommands

public void displayCommands(java.awt.Rectangle loc)
This node has been right clicked. The locations of this node is given by the loc object. Use this location to popup the object message menu.
Specified by:
displayCommands in interface OpenJMSNode
Parameters:
The - location of this Consumer node.

toString

public java.lang.String toString()
The unique name of this object.
Specified by:
toString in interface OpenJMSNode
Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode
Returns:
String the object name.

refresh

protected void refresh()
This node has changed. Inform the parent tree that it needs to be re-drawn.

getInstanceSelected

protected static OpenJMSObject getInstanceSelected()
Get the particular instance of the object that has been selected.
Returns:
the instance selected.


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.