nl.tudelft.simulation.naming.context
Class ContextNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by nl.tudelft.simulation.naming.context.ContextNode
All Implemented Interfaces:
Serializable, Cloneable, EventListener, NamespaceChangeListener, NamingListener, MutableTreeNode, TreeNode

public class ContextNode
extends DefaultMutableTreeNode
implements NamespaceChangeListener

A node in the context.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.0
Version:
1.5 2004-03-24
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
static EventType NODE_CHANGED_EVENT
          NODE_CHANGED_EVENT
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
ContextNode(ContextTreeModel treeModel, String name, EventContext context, Class[] displayClasses, boolean displayFields)
          constructs a new ContextNode
ContextNode(Object userObject)
          constructs a new ContextNode
 
Method Summary
 void namingExceptionThrown(NamingExceptionEvent event)
           
 void objectAdded(NamingEvent event)
           
 void objectRemoved(NamingEvent event)
           
 void objectRenamed(NamingEvent event)
           
 
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
 

Field Detail

NODE_CHANGED_EVENT

public static final EventType NODE_CHANGED_EVENT
NODE_CHANGED_EVENT

Constructor Detail

ContextNode

public ContextNode(ContextTreeModel treeModel,
                   String name,
                   EventContext context,
                   Class[] displayClasses,
                   boolean displayFields)
            throws NamingException
constructs a new ContextNode

Parameters:
treeModel - the treeModel
name - the name
context - the context
displayClasses - the classes to display
displayFields - the fields to show
Throws:
NamingException - on failure

ContextNode

public ContextNode(Object userObject)
constructs a new ContextNode

Parameters:
userObject - the userObject
Method Detail

objectAdded

public void objectAdded(NamingEvent event)
Specified by:
objectAdded in interface NamespaceChangeListener
See Also:
#objectAdded(javax.naming.event.NamingEvent)

objectRemoved

public void objectRemoved(NamingEvent event)
Specified by:
objectRemoved in interface NamespaceChangeListener
See Also:
#objectRemoved(javax.naming.event.NamingEvent)

objectRenamed

public void objectRenamed(NamingEvent event)
Specified by:
objectRenamed in interface NamespaceChangeListener
See Also:
#objectRenamed(javax.naming.event.NamingEvent)

namingExceptionThrown

public void namingExceptionThrown(NamingExceptionEvent event)
Specified by:
namingExceptionThrown in interface NamingListener
See Also:
#namingExceptionThrown(javax.naming.event.NamingExceptionEvent)


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.