com.tensegrity.graph.event
Class VetoableVisualGraphEventMediator

java.lang.Object
  extended bycom.tensegrity.graph.event.VetoableVisualGraphEventMediator
All Implemented Interfaces:
EventListenerTag, VetoableVisualGraphListener

public class VetoableVisualGraphEventMediator
extends java.lang.Object
implements VetoableVisualGraphListener

The VetoableVisualGraphEventMediator facilitates to gain access to all vetoable VisualGraphEvents.
The VetoableVisualGraphEventMediator is allways an instance variable of a VisualGraph and hasn't to be implemented nor registered to a VisualGraphObject instance. This is a mandatory commandment!
An implementation of a VisualGraph allways comes with its own VetoableVisualGraphEventMediator implementation and is a major part of the architecture.

To be informed about all occuring vetoable events an object has to implement the VetoableGraphEventMediatorListener interface and then registered at a specific VisualGraph as VetoableVisualGraphEventMediatorListener.

Version:
$Id: VetoableVisualGraphEventMediator.java,v 1.3 2005/04/04 07:16:20 MichaelKegel Exp $
Author:
MichaelKegel

Constructor Summary
VetoableVisualGraphEventMediator()
          Constructor for VetoableGraphEventMediator.
 
Method Summary
 void addMediatorListener(VetoableVisualGraphEventMediatorListener listener)
          Adds the VetoableVisualGraphEventMediatorListener given by listener to the VetoableVisualGraphEventMediator instance such that the listener will be notified about every event that occurs.
 java.util.List getListeners()
          Returns a List of the VetoableVisualGraphEventMediatorListeners currently registered.
 void removeMediatorListener(VetoableVisualGraphEventMediatorListener listener)
          Removes the VetoableVisualGraphEventMediatorListener given by listener from the VetoableVisualGraphEventMediator instance such that the listener will no longer be notified about occuring events.
 void vetoableIsolatedVisualEdgePreAdd(VisualGraphEvent visualgraphevent)
          This mehtod is called when an isolated VisualEdge is about to be added to a VisualGraph.
 void vetoableIsolatedVisualEdgePreRemove(VisualGraphEvent visualgraphevent)
          This method is called when an isolated VisualEdge is about to be removed from a VisualGraph.
 void vetoableVisualEdgePreAdd(VisualGraphEvent visualgraphevent)
          This mehtod is called when an VisualEdge is about to be added to a VisualGraph.
 void vetoableVisualEdgePreRemove(VisualGraphEvent visualgraphevent)
          This method is called when an VisualEdge is about to be removed from a VisualGraph.
 void vetoableVisualNodePreAdd(VisualGraphEvent visualgraphevent)
          This method is called when a VisualNode is about to be added to a VisualGraph.
 void vetoableVisualNodePreRemove(VisualGraphEvent visualgraphevent)
          This method is called when a VisualNode is about to be removed from a VisualGraph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VetoableVisualGraphEventMediator

public VetoableVisualGraphEventMediator()
Constructor for VetoableGraphEventMediator.

Method Detail

addMediatorListener

public void addMediatorListener(VetoableVisualGraphEventMediatorListener listener)
Adds the VetoableVisualGraphEventMediatorListener given by listener to the VetoableVisualGraphEventMediator instance such that the listener will be notified about every event that occurs.

Parameters:
listener - the VetoableVisualGraphEventMediatorListener to add

removeMediatorListener

public void removeMediatorListener(VetoableVisualGraphEventMediatorListener listener)
Removes the VetoableVisualGraphEventMediatorListener given by listener from the VetoableVisualGraphEventMediator instance such that the listener will no longer be notified about occuring events.

Parameters:
listener - the VetoableVisualGraphEventMediatorListener to remove

getListeners

public java.util.List getListeners()
Returns a List of the VetoableVisualGraphEventMediatorListeners currently registered.

Returns:
List the list of the listeners currently registered

vetoableVisualNodePreAdd

public void vetoableVisualNodePreAdd(VisualGraphEvent visualgraphevent)
                              throws VisualGraphEventVetoException
Description copied from interface: VetoableVisualGraphListener
This method is called when a VisualNode is about to be added to a VisualGraph.
If the implementor throws a VisualGraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Specified by:
vetoableVisualNodePreAdd in interface VetoableVisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure carrying event information.
Throws:
VisualGraphEventVetoException - that indicates the VisualGraphEvent is not desired.

vetoableVisualNodePreRemove

public void vetoableVisualNodePreRemove(VisualGraphEvent visualgraphevent)
                                 throws VisualGraphEventVetoException
Description copied from interface: VetoableVisualGraphListener
This method is called when a VisualNode is about to be removed from a VisualGraph.
If the implementor throws a VisualGraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Specified by:
vetoableVisualNodePreRemove in interface VetoableVisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure carrying event information.
Throws:
VisualGraphEventVetoException - that indicates the VisualGraphEvent is not desired.

vetoableVisualEdgePreAdd

public void vetoableVisualEdgePreAdd(VisualGraphEvent visualgraphevent)
                              throws VisualGraphEventVetoException
Description copied from interface: VetoableVisualGraphListener
This mehtod is called when an VisualEdge is about to be added to a VisualGraph.
If the implementor throws a VisualGraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Specified by:
vetoableVisualEdgePreAdd in interface VetoableVisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure carrying event information.
Throws:
VisualGraphEventVetoException - that indicates the VisualGraphEvent is not desired.

vetoableVisualEdgePreRemove

public void vetoableVisualEdgePreRemove(VisualGraphEvent visualgraphevent)
                                 throws VisualGraphEventVetoException
Description copied from interface: VetoableVisualGraphListener
This method is called when an VisualEdge is about to be removed from a VisualGraph.
If the implementor throws a VisualGraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Specified by:
vetoableVisualEdgePreRemove in interface VetoableVisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure carrying event information.
Throws:
VisualGraphEventVetoException - that indicates the VisualGraphEvent is not desired.

vetoableIsolatedVisualEdgePreAdd

public void vetoableIsolatedVisualEdgePreAdd(VisualGraphEvent visualgraphevent)
                                      throws VisualGraphEventVetoException
Description copied from interface: VetoableVisualGraphListener
This mehtod is called when an isolated VisualEdge is about to be added to a VisualGraph.
If the implementor throws a VisualGraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Specified by:
vetoableIsolatedVisualEdgePreAdd in interface VetoableVisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure carrying event information.
Throws:
VisualGraphEventVetoException - that indicates the VisualGraphEvent is not desired.

vetoableIsolatedVisualEdgePreRemove

public void vetoableIsolatedVisualEdgePreRemove(VisualGraphEvent visualgraphevent)
                                         throws VisualGraphEventVetoException
Description copied from interface: VetoableVisualGraphListener
This method is called when an isolated VisualEdge is about to be removed from a VisualGraph.
If the implementor throws a VisualGraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Specified by:
vetoableIsolatedVisualEdgePreRemove in interface VetoableVisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure carrying event information.
Throws:
VisualGraphEventVetoException - that indicates the VisualGraphEvent is not desired.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.