org.argouml.ui.explorer
Class ExplorerEventAdaptor

java.lang.Object
  extended by org.argouml.ui.explorer.ExplorerEventAdaptor
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public final class ExplorerEventAdaptor
extends java.lang.Object
implements java.beans.PropertyChangeListener

All events going to the Explorer must pass through here first!

Most will come from the uml model via the EventAdapter interface.

TODO: In some cases (test cases) this object is created without setting the treeModel. I (Linus) will add tests for this now. It would be better if this is created only when the Explorer is created.

TODO: The ExplorerTreeNode also listens to some events (from Diagrams), so it does not follow the rule above.

Since:
0.15.2, Created on 16 September 2003, 23:13

Method Summary
static ExplorerEventAdaptor getInstance()
           
 void modelElementAdded(java.lang.Object element)
          forwards this event to the tree model.
 void modelElementChanged(java.lang.Object element)
          forwards this event to the tree model.
 void modelElementRemoved(java.lang.Object element)
          Deprecated. for 0.25.4 by tfmorris. Send an event rather than calling this method directly. This is not currently used by ArgoUML and removal is handled by Model subsystem events.
 void propertyChange(java.beans.PropertyChangeEvent pce)
          Listens to events coming from the project manager, config manager, and uml model, passes those events on to the explorer model.
 void setTreeModelUMLEventListener(TreeModelUMLEventListener newTreeModel)
          sets the tree model that will receive events.
 void structureChanged()
          Deprecated. by mvw in V0.25.4. Use events instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ExplorerEventAdaptor getInstance()
Returns:
the instance (singleton)

structureChanged

@Deprecated
public void structureChanged()
Deprecated. by mvw in V0.25.4. Use events instead.

The tree structure has changed significantly. Inform the associated tree model. TODO: This shouldn't be public. Components desiring to inform the Explorer of changes should send events.


modelElementRemoved

@Deprecated
public void modelElementRemoved(java.lang.Object element)
Deprecated. for 0.25.4 by tfmorris. Send an event rather than calling this method directly. This is not currently used by ArgoUML and removal is handled by Model subsystem events.

forwards this event to the tree model.

Parameters:
element - the modelelement to be removed

modelElementAdded

public void modelElementAdded(java.lang.Object element)
forwards this event to the tree model.

Parameters:
element - the modelelement to be added TODO: This shouldn't be public. Components desiring to inform the Explorer of changes should send events.

modelElementChanged

public void modelElementChanged(java.lang.Object element)
forwards this event to the tree model.

Parameters:
element - the modelelement to be changed TODO: This shouldn't be public. Components desiring to inform the Explorer of changes should send events.

setTreeModelUMLEventListener

public void setTreeModelUMLEventListener(TreeModelUMLEventListener newTreeModel)
sets the tree model that will receive events.

Parameters:
newTreeModel - the tree model to be used

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pce)
Listens to events coming from the project manager, config manager, and uml model, passes those events on to the explorer model.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Since:
ARGO0.11.2
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook