ptolemy.vergil.basic
Class AbstractBasicGraphModel.GraphChangeListener

java.lang.Object
  extended byptolemy.vergil.basic.AbstractBasicGraphModel.GraphChangeListener
All Implemented Interfaces:
ChangeListener
Enclosing class:
AbstractBasicGraphModel

public class AbstractBasicGraphModel.GraphChangeListener
extends java.lang.Object
implements ChangeListener

Mutations may happen to the ptolemy model without the knowledge of this model. This change listener listens for those changes, and when they occur, issues a GraphEvent so that any views of this graph model can update themselves. Note that although the graph model uses mutations to make changes to the ptolemy model, those graph events are not handled here. Instead, they are handled in the base class since they can be easily propagated at a finer level of granularity than is possible here.


Constructor Summary
AbstractBasicGraphModel.GraphChangeListener()
           
 
Method Summary
 void changeExecuted(ChangeRequest change)
          Notify the listener that a change has been successfully executed.
 void changeFailed(ChangeRequest change, java.lang.Exception exception)
          Notify the listener that the change has failed with the specified exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBasicGraphModel.GraphChangeListener

public AbstractBasicGraphModel.GraphChangeListener()
Method Detail

changeExecuted

public void changeExecuted(ChangeRequest change)
Notify the listener that a change has been successfully executed. If the originator of this change is not this graph model, then issue a graph event to indicate that the structure of the graph has changed.

Specified by:
changeExecuted in interface ChangeListener
Parameters:
change - The change that has been executed.

changeFailed

public void changeFailed(ChangeRequest change,
                         java.lang.Exception exception)
Notify the listener that the change has failed with the specified exception.

Specified by:
changeFailed in interface ChangeListener
Parameters:
change - The change that has failed.
exception - The exception that was thrown.