com.tensegrity.graph.event
Interface VetoableGraphListener

All Superinterfaces:
EventListenerTag
All Known Subinterfaces:
VetoableGraphEventMediatorListener
All Known Implementing Classes:
GraphEventMultiplexer, VetoableGraphEventMediator

public interface VetoableGraphListener
extends EventListenerTag

The VetoableGraphListener interface defines an object that is able to receive events that are related to a Graph instance and is able to veto the received events.

To veto an event means that the processing of the event is completely stopped.
To veto an event the listener has to throw a GraphEventVetoException.

VetoableGraphListeners should not process an event like a normal GraphListener may does. Their sole task is to veto an event if necessary.

Version:
$Id: VetoableGraphListener.java,v 1.5 2005/04/04 07:16:07 MichaelKegel Exp $
Author:
MichaelKegel

Method Summary
 void vetoableEdgePreAdd(GraphEvent graphevent)
          This mehtod is called when an Edge is about to be added to a Graph.
 void vetoableEdgePreRemove(GraphEvent graphevent)
          This method is called when an Edge is about to be removed from a Graph.
 void vetoableEdgePreSplit(GraphEvent graphevent)
          This method is called when an Edge is about to be split by a node.
 void vetoableNodePreAdd(GraphEvent graphevent)
          This method is called when a Node is about to be added to a Graph.
 void vetoableNodePreDeleteEdgeCascade(GraphEvent graphevent)
          This method is called when an Node is about to delete, which will is connected by two edges that will be automatically merged into a single edge.
 void vetoableNodePreRemove(GraphEvent graphevent)
          This method is called when a Node is about to be removed from a Graph.
 

Method Detail

vetoableNodePreAdd

public void vetoableNodePreAdd(GraphEvent graphevent)
                        throws GraphEventVetoException
This method is called when a Node is about to be added to a Graph.
If the implementor throws a GraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Parameters:
graphevent - the GraphEvent structure carrying event information.
Throws:
GraphEventVetoException - that indicates the GraphEvent is not desired.

vetoableNodePreRemove

public void vetoableNodePreRemove(GraphEvent graphevent)
                           throws GraphEventVetoException
This method is called when a Node is about to be removed from a Graph.
If the implementor throws a GraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Parameters:
graphevent - the GraphEvent structure carrying event information.
Throws:
GraphEventVetoException - that indicates the GraphEvent is not desired.

vetoableEdgePreAdd

public void vetoableEdgePreAdd(GraphEvent graphevent)
                        throws GraphEventVetoException
This mehtod is called when an Edge is about to be added to a Graph.
If the implementor throws a GraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Parameters:
graphevent - the GraphEvent structure carrying event information.
Throws:
GraphEventVetoException - that indicates the GraphEvent is not desired.

vetoableEdgePreRemove

public void vetoableEdgePreRemove(GraphEvent graphevent)
                           throws GraphEventVetoException
This method is called when an Edge is about to be removed from a Graph.
If the implementor throws a GraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Parameters:
graphevent - the GraphEvent structure carrying event information.
Throws:
GraphEventVetoException - that indicates the GraphEvent is not desired.

vetoableEdgePreSplit

public void vetoableEdgePreSplit(GraphEvent graphevent)
                          throws GraphEventVetoException
This method is called when an Edge is about to be split by a node. If the implementor throws a GraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Parameters:
graphevent - the GraphEvent structure carrying event information.
Throws:
GraphEventVetoException - that indicates the GraphEvent is not desired.

vetoableNodePreDeleteEdgeCascade

public void vetoableNodePreDeleteEdgeCascade(GraphEvent graphevent)
                                      throws GraphEventVetoException
This method is called when an Node is about to delete, which will is connected by two edges that will be automatically merged into a single edge. If the implementor throws a GraphEventVetoException the event will be veto'd and the corresponding action will not be completed.

Parameters:
graphevent - the GraphEvent structure carrying event information.
Throws:
GraphEventVetoException - that indicates the GraphEvent is not desired.


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