com.tensegrity.graph.event
Class GraphEventMultiplexer

java.lang.Object
  extended bycom.tensegrity.generic.event.EventMultiplexer
      extended bycom.tensegrity.graph.event.GraphEventMultiplexer
All Implemented Interfaces:
EdgeListener, EventListenerTag, GraphListener, NodeListener, VetoableGraphListener, VetoableVisualGraphListener, VisualEdgeListener, VisualGraphListener, VisualNodeListener

public class GraphEventMultiplexer
extends EventMultiplexer
implements GraphListener, VetoableGraphListener, NodeListener, EdgeListener, VisualGraphListener, VetoableVisualGraphListener, VisualNodeListener, VisualEdgeListener

Multiplexer for graphevents.

Version:
$Id: GraphEventMultiplexer.java,v 1.34 2006/03/23 11:15:10 MichaelKegel Exp $
Author:
Stepan Rutz

Constructor Summary
GraphEventMultiplexer(EventListenerTag a, EventListenerTag b)
          Constructs a new GraphEventMultiplexer instance with the given children.
 
Method Summary
static EventListenerTag combine(EventListenerTag a, EventListenerTag b)
          Combines two given eventlisteners to a new eventlistener.
 void edgeAdded(GraphEvent graphevent)
          Invoked after an edge was added to the graph.
 void edgeAddedToGraph(EdgeEvent edgeevent)
          This method is invoked on the listener if an Edge was added to the graph.
 void edgeAttachRejected(GraphEvent graphevent)
          An attachment of an edge was rejected by the graph.
 void edgePreAdd(GraphEvent graphevent)
          Invoked when an edge is about to be added to a graph.
 void edgePreRemove(GraphEvent graphevent)
          Invoked when an edge is about to be removed from a graph.
 void edgePreSplit(GraphEvent graphevent)
          An edge is about to be split split and then would be replaced by two new edges.
 void edgeRemoved(GraphEvent graphevent)
          Invoked after an edge was removed from the graph.
 void edgeRemovedFromGraph(EdgeEvent edgeevent)
          This method is invoked on the listener if an Edge was removed from the graph.
 void edgeSplit(GraphEvent graphevent)
          An edge was split and replaced by two new edges.
 void isolatedVisualEdgeAdded(VisualEdgeEvent event)
          This method is invoked when an isolated VisualEdge is added.
 void isolatedVisualEdgeAdded(VisualGraphEvent visualgraphevent)
          An isolated VisualEdge was added to the VisualGraph.
 void isolatedVisualEdgeRemoved(VisualEdgeEvent event)
          This method is invoked when an isolated VisualEdge is removed.
 void isolatedVisualEdgeRemoved(VisualGraphEvent visualgraphevent)
          An isolated VisualEdge was removed from the VisualGraph.
 void layout(VisualGraphEvent visualgraphevent)
          The structure of the VisualGraph has changed by an action on the graph, so that the current layout of the graph has to be applied.
static EdgeListener multiplex(EdgeListener a, EdgeListener b)
          Multiplexes an EdgeListener.
static GraphListener multiplex(GraphListener a, GraphListener b)
          Combines the two given listeners.
static NodeListener multiplex(NodeListener a, NodeListener b)
          Multiplexes a NodeListener.
static VetoableGraphListener multiplex(VetoableGraphListener a, VetoableGraphListener b)
          Multiplexes a VetoableGraphListener.
static VetoableVisualGraphListener multiplex(VetoableVisualGraphListener a, VetoableVisualGraphListener b)
          Multiplexes an VetoableVisualGraphListener.
static VisualEdgeListener multiplex(VisualEdgeListener a, VisualEdgeListener b)
          Multiplexes a VisualEdgeListener.
static VisualGraphListener multiplex(VisualGraphListener a, VisualGraphListener b)
          Multiplexes a VisualGraphListener.
static VisualNodeListener multiplex(VisualNodeListener a, VisualNodeListener b)
          Multiplexes an VisualNodeListener.
 void nodeAdded(GraphEvent graphevent)
          Invoked after a node was added to the graph.
 void nodeAddedToGraph(NodeEvent nodeevent)
          This method is invoked on the listener if a Node was added to the graph.
 void nodeDeleteEdgeCascade(GraphEvent graphevent)
          A node with indegree = outdegree = 1 was deleted and the adjacent edges are deleted as well.
 void nodePreAdd(GraphEvent graphevent)
          Invoked when a node is about to be added to a graph.
 void nodePreDeleteEdgeCascade(GraphEvent graphevent)
          A node with indegree = outdegree = 1 is about to be deleted and the adjacent edges will be deleted as well.
 void nodePreRemove(GraphEvent graphevent)
          Invoked when a node is about to be removed from a graph.
 void nodeRemoved(GraphEvent graphevent)
          Invoked after a node was removed from the graph.
 void nodeRemovedFromGraph(NodeEvent nodeevent)
          This method is invoked on the listener if a Node was removed from the graph #
 void portAddedToNode(NodeEvent nodeevent)
          This method is invoked on the listener if a Port is added to a Node.
 void portRemovedFromNode(NodeEvent nodeevent)
          This method is invoked on the listener if a Port is removed from a Node.
 EventListenerTag separate(EventListenerTag listener)
          Internal helper for separation.
static EventListenerTag separate(EventListenerTag a, EventListenerTag b)
          Separates the eventlistener b from the eventlistener a and returns the eventlistener structure.
static EdgeListener unmultiplex(EdgeListener a, EdgeListener b)
          Unmultiplexes an EdgeListener.
static GraphListener unmultiplex(GraphListener a, GraphListener b)
          Separates the eventlistener b from the eventlistener a and returns the eventlistener structure.
static NodeListener unmultiplex(NodeListener a, NodeListener b)
          Unmultiplexes a NodeListener.
static VetoableGraphListener unmultiplex(VetoableGraphListener a, VetoableGraphListener b)
          Unmultiplexes a VetoableGraphListener.
static VetoableVisualGraphListener unmultiplex(VetoableVisualGraphListener a, VetoableVisualGraphListener b)
          Unmultiplexes an VetoableVisualGraphListener.
static VisualEdgeListener unmultiplex(VisualEdgeListener a, VisualEdgeListener b)
          Unmultiplexes a VisualEdgeListener.
static VisualGraphListener unmultiplex(VisualGraphListener a, VisualGraphListener b)
          Unmultiplexes a VisualGraphListener.
static VisualNodeListener unmultiplex(VisualNodeListener a, VisualNodeListener b)
          Unmultiplexes an VisualNodeListener.
 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 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 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.
 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.
 void visualEdgeAdded(VisualEdgeEvent event)
          This method is invoked when a VisualEdge is added.
 void visualEdgeAdded(VisualGraphEvent visualgraphevent)
          A VisualEdge was added to the VisualGraph.
 void visualEdgeAttachRejected(VisualGraphEvent visualgraphevent)
          An attachment of a VisualEdge was rejected by the graph.
 void visualEdgeRemoved(VisualEdgeEvent event)
          This method is invoked when a VisualEdge is removed.
 void visualEdgeRemoved(VisualGraphEvent visualgraphevent)
          A VisualEdge was removed from the VisualGraph.
 void visualEdgeSplit(VisualGraphEvent visualgraphevent)
          An edge-split was performed.
 void visualNodeAdded(VisualGraphEvent visualgraphevent)
          A VisualNode was added to the VisualGraph.
 void visualNodeAdded(VisualNodeEvent event)
          This method is invoked when a VisualNode is added.
 void visualNodeDeleteEdgeCascade(VisualGraphEvent visualgraphevent)
          An edge-cascade was performed.
 void visualNodeRemoved(VisualGraphEvent visualgraphevent)
          A VisualNode was added to the VisualGraph.
 void visualNodeRemoved(VisualNodeEvent event)
          This method is invoked when a VisualNode is removed.
 void visualPortAdded(VisualNodeEvent event)
          This method is invoked on the listener if a VisualPort is added to a VisualNode.
 void visualPortRemoved(VisualNodeEvent event)
          This method is invoked on the listener if a VisualPort is removed from a VisualNode.
 
Methods inherited from class com.tensegrity.generic.event.EventMultiplexer
a, b, countEventListeners, listenersToArrayList, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphEventMultiplexer

public GraphEventMultiplexer(EventListenerTag a,
                             EventListenerTag b)
Constructs a new GraphEventMultiplexer instance with the given children.

Parameters:
a - first child multiplexer.
b - second child multiplexer.
Method Detail

combine

public static EventListenerTag combine(EventListenerTag a,
                                       EventListenerTag b)
Combines two given eventlisteners to a new eventlistener.

Parameters:
a - the first eventlistener to combine.
b - the second eventlistener to combine.
Returns:
the new eventlistener that combines the two given eventlisteners.

separate

public static EventListenerTag separate(EventListenerTag a,
                                        EventListenerTag b)
Separates the eventlistener b from the eventlistener a and returns the eventlistener structure.

Parameters:
a - the first eventlistener to separate
b - the second eventlistener to separate.
Returns:
the new eventlistener that separates b from a.

separate

public EventListenerTag separate(EventListenerTag listener)
Internal helper for separation.

Parameters:
listener - the listener to discard.
Returns:
the new root.

multiplex

public static GraphListener multiplex(GraphListener a,
                                      GraphListener b)
Combines the two given listeners.

Parameters:
a - the first listener to combine.
b - the first listener to combine. This argument may not be null.
Returns:
a listener holding both combined listeners.

unmultiplex

public static GraphListener unmultiplex(GraphListener a,
                                        GraphListener b)
Separates the eventlistener b from the eventlistener a and returns the eventlistener structure.

Parameters:
a - the first eventlistener to separate
b - the second eventlistener to separate. This argument may not be null.
Returns:
the new eventlistener that separates b from a.

nodePreAdd

public void nodePreAdd(GraphEvent graphevent)
Description copied from interface: GraphListener
Invoked when a node is about to be added to a graph.

Specified by:
nodePreAdd in interface GraphListener

nodePreRemove

public void nodePreRemove(GraphEvent graphevent)
Description copied from interface: GraphListener
Invoked when a node is about to be removed from a graph.

Specified by:
nodePreRemove in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

nodeAdded

public void nodeAdded(GraphEvent graphevent)
Description copied from interface: GraphListener
Invoked after a node was added to the graph.

Specified by:
nodeAdded in interface GraphListener
Parameters:
graphevent - the graphevent structure carrying graphevent information.

nodeRemoved

public void nodeRemoved(GraphEvent graphevent)
Description copied from interface: GraphListener
Invoked after a node was removed from the graph.

Specified by:
nodeRemoved in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

edgePreAdd

public void edgePreAdd(GraphEvent graphevent)
Description copied from interface: GraphListener
Invoked when an edge is about to be added to a graph.

Specified by:
edgePreAdd in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

edgePreRemove

public void edgePreRemove(GraphEvent graphevent)
Description copied from interface: GraphListener
Invoked when an edge is about to be removed from a graph.

Specified by:
edgePreRemove in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

edgeAdded

public void edgeAdded(GraphEvent graphevent)
Description copied from interface: GraphListener
Invoked after an edge was added to the graph.

Specified by:
edgeAdded in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

edgeRemoved

public void edgeRemoved(GraphEvent graphevent)
Description copied from interface: GraphListener
Invoked after an edge was removed from the graph.

Specified by:
edgeRemoved in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

edgeAttachRejected

public void edgeAttachRejected(GraphEvent graphevent)
Description copied from interface: GraphListener
An attachment of an edge was rejected by the graph.

Specified by:
edgeAttachRejected in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

edgePreSplit

public void edgePreSplit(GraphEvent graphevent)
Description copied from interface: GraphListener
An edge is about to be split split and then would be replaced by two new edges.

Specified by:
edgePreSplit in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

edgeSplit

public void edgeSplit(GraphEvent graphevent)
Description copied from interface: GraphListener
An edge was split and replaced by two new edges.

Specified by:
edgeSplit in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

multiplex

public static VetoableGraphListener multiplex(VetoableGraphListener a,
                                              VetoableGraphListener b)
Multiplexes a VetoableGraphListener.

Parameters:
a - the first VetoableGraphListener to multiplex.
b - the second VetoableGraphListener to multiplex.
Returns:
the new root listener.

unmultiplex

public static VetoableGraphListener unmultiplex(VetoableGraphListener a,
                                                VetoableGraphListener b)
Unmultiplexes a VetoableGraphListener.

Parameters:
a - the first VetoableGraphListener to unmultiplex.
b - the second VetoableGraphListener to unmultiplex.
Returns:
the new root listener.

vetoableNodePreAdd

public void vetoableNodePreAdd(GraphEvent graphevent)
                        throws GraphEventVetoException
Description copied from interface: VetoableGraphListener
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.

Specified by:
vetoableNodePreAdd in interface VetoableGraphListener
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
Description copied from interface: VetoableGraphListener
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.

Specified by:
vetoableNodePreRemove in interface VetoableGraphListener
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
Description copied from interface: VetoableGraphListener
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.

Specified by:
vetoableEdgePreAdd in interface VetoableGraphListener
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
Description copied from interface: VetoableGraphListener
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.

Specified by:
vetoableEdgePreRemove in interface VetoableGraphListener
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
Description copied from interface: VetoableGraphListener
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.

Specified by:
vetoableEdgePreSplit in interface VetoableGraphListener
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
Description copied from interface: VetoableGraphListener
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.

Specified by:
vetoableNodePreDeleteEdgeCascade in interface VetoableGraphListener
Parameters:
graphevent - the GraphEvent structure carrying event information.
Throws:
GraphEventVetoException - that indicates the GraphEvent is not desired.

nodePreDeleteEdgeCascade

public void nodePreDeleteEdgeCascade(GraphEvent graphevent)
Description copied from interface: GraphListener
A node with indegree = outdegree = 1 is about to be deleted and the adjacent edges will be deleted as well. The two deleted edges will be replaced by a new edge.

Specified by:
nodePreDeleteEdgeCascade in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

nodeDeleteEdgeCascade

public void nodeDeleteEdgeCascade(GraphEvent graphevent)
Description copied from interface: GraphListener
A node with indegree = outdegree = 1 was deleted and the adjacent edges are deleted as well. The two deleted edges were replaced by a new edge.

Specified by:
nodeDeleteEdgeCascade in interface GraphListener
Parameters:
graphevent - the structure carrying graphevent information.

multiplex

public static NodeListener multiplex(NodeListener a,
                                     NodeListener b)
Multiplexes a NodeListener.

Parameters:
a - the first NodeListener to multiplex.
b - the second NodeListener to multiplex.
Returns:
the new root listener.

unmultiplex

public static NodeListener unmultiplex(NodeListener a,
                                       NodeListener b)
Unmultiplexes a NodeListener.

Parameters:
a - the first NodeListener to unmultiplex.
b - the second NodeListener to unmultiplex.
Returns:
the new root listener.

nodeAddedToGraph

public void nodeAddedToGraph(NodeEvent nodeevent)
Description copied from interface: NodeListener
This method is invoked on the listener if a Node was added to the graph.

Specified by:
nodeAddedToGraph in interface NodeListener
Parameters:
nodeevent - the event structure that carries details about the event.

nodeRemovedFromGraph

public void nodeRemovedFromGraph(NodeEvent nodeevent)
Description copied from interface: NodeListener
This method is invoked on the listener if a Node was removed from the graph #

Specified by:
nodeRemovedFromGraph in interface NodeListener
Parameters:
nodeevent - the event structure that carries details about the event.

portAddedToNode

public void portAddedToNode(NodeEvent nodeevent)
Description copied from interface: NodeListener
This method is invoked on the listener if a Port is added to a Node.

Specified by:
portAddedToNode in interface NodeListener
Parameters:
nodeevent - the event structure that carries details about the event.

portRemovedFromNode

public void portRemovedFromNode(NodeEvent nodeevent)
Description copied from interface: NodeListener
This method is invoked on the listener if a Port is removed from a Node.

Specified by:
portRemovedFromNode in interface NodeListener
Parameters:
nodeevent - the event structure that carries details about the event.

multiplex

public static EdgeListener multiplex(EdgeListener a,
                                     EdgeListener b)
Multiplexes an EdgeListener.

Parameters:
a - the first EdgeListener to multiplex.
b - the second EdgeListener to multiplex.
Returns:
the new root listener.

unmultiplex

public static EdgeListener unmultiplex(EdgeListener a,
                                       EdgeListener b)
Unmultiplexes an EdgeListener.

Parameters:
a - the first EdgeListener to unmultiplex.
b - the second EdgeListener to unmultiplex.
Returns:
the new root listener.

edgeAddedToGraph

public void edgeAddedToGraph(EdgeEvent edgeevent)
Description copied from interface: EdgeListener
This method is invoked on the listener if an Edge was added to the graph.

Specified by:
edgeAddedToGraph in interface EdgeListener
Parameters:
edgeevent - the event structure that carries details about the event.

edgeRemovedFromGraph

public void edgeRemovedFromGraph(EdgeEvent edgeevent)
Description copied from interface: EdgeListener
This method is invoked on the listener if an Edge was removed from the graph.

Specified by:
edgeRemovedFromGraph in interface EdgeListener
Parameters:
edgeevent - the event structure that carries details about the event.

multiplex

public static VisualGraphListener multiplex(VisualGraphListener a,
                                            VisualGraphListener b)
Multiplexes a VisualGraphListener.

Parameters:
a - the first VisualGraphListener to multiplex.
b - the second VisualGraphListener to multiplex.
Returns:
the new root listener.

unmultiplex

public static VisualGraphListener unmultiplex(VisualGraphListener a,
                                              VisualGraphListener b)
Unmultiplexes a VisualGraphListener.

Parameters:
a - the first VisualGraphListener to unmultiplex.
b - the second VisualGraphListener to unmultiplex.
Returns:
the new root listener.

visualNodeAdded

public void visualNodeAdded(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
A VisualNode was added to the VisualGraph.

Specified by:
visualNodeAdded in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualNodeRemoved

public void visualNodeRemoved(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
A VisualNode was added to the VisualGraph.

Specified by:
visualNodeRemoved in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualEdgeAdded

public void visualEdgeAdded(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
A VisualEdge was added to the VisualGraph.

Specified by:
visualEdgeAdded in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualEdgeRemoved

public void visualEdgeRemoved(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
A VisualEdge was removed from the VisualGraph.

Specified by:
visualEdgeRemoved in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

isolatedVisualEdgeAdded

public void isolatedVisualEdgeAdded(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An isolated VisualEdge was added to the VisualGraph.

Specified by:
isolatedVisualEdgeAdded in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

isolatedVisualEdgeRemoved

public void isolatedVisualEdgeRemoved(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An isolated VisualEdge was removed from the VisualGraph.

Specified by:
isolatedVisualEdgeRemoved in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualEdgeAttachRejected

public void visualEdgeAttachRejected(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An attachment of a VisualEdge was rejected by the graph. This event is thrown to indicate that an edge could not be added if the library chooses to do so in certain contexts. If it however not thrown in all cases when a VisualEdge cannot be added. If for example an already added VisualEdge is added, this event is not thrown.

Specified by:
visualEdgeAttachRejected in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

layout

public void layout(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
The structure of the VisualGraph has changed by an action on the graph, so that the current layout of the graph has to be applied. Note: programmatically changes like node insertion might not invoke this callback

Specified by:
layout in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualEdgeSplit

public void visualEdgeSplit(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An edge-split was performed.

Specified by:
visualEdgeSplit in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualNodeDeleteEdgeCascade

public void visualNodeDeleteEdgeCascade(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An edge-cascade was performed.

Specified by:
visualNodeDeleteEdgeCascade in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

multiplex

public static VetoableVisualGraphListener multiplex(VetoableVisualGraphListener a,
                                                    VetoableVisualGraphListener b)
Multiplexes an VetoableVisualGraphListener.

Parameters:
a - the first VetoableVisualGraphListener to multiplex.
b - the second VetoableVisualGraphListener to multiplex.
Returns:
the new root listener.

unmultiplex

public static VetoableVisualGraphListener unmultiplex(VetoableVisualGraphListener a,
                                                      VetoableVisualGraphListener b)
Unmultiplexes an VetoableVisualGraphListener.

Parameters:
a - the first VetoableVisualGraphListener to unmultiplex.
b - the second VetoableVisualGraphListener to unmultiplex.
Returns:
the new root listener.

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.

multiplex

public static VisualNodeListener multiplex(VisualNodeListener a,
                                           VisualNodeListener b)
Multiplexes an VisualNodeListener.

Parameters:
a - the first VisualNodeListener to multiplex.
b - the second VisualNodeListener to multiplex.
Returns:
the new root listener.

unmultiplex

public static VisualNodeListener unmultiplex(VisualNodeListener a,
                                             VisualNodeListener b)
Unmultiplexes an VisualNodeListener.

Parameters:
a - the first VisualNodeListener to unmultiplex.
b - the second VisualNodeListener to unmultiplex.
Returns:
the new root listener.

visualNodeAdded

public void visualNodeAdded(VisualNodeEvent event)
Description copied from interface: VisualNodeListener
This method is invoked when a VisualNode is added.

Specified by:
visualNodeAdded in interface VisualNodeListener
Parameters:
event - the event structure carrying additional information.

visualNodeRemoved

public void visualNodeRemoved(VisualNodeEvent event)
Description copied from interface: VisualNodeListener
This method is invoked when a VisualNode is removed.

Specified by:
visualNodeRemoved in interface VisualNodeListener
Parameters:
event - the event structure carrying additional information.

visualPortAdded

public void visualPortAdded(VisualNodeEvent event)
Description copied from interface: VisualNodeListener
This method is invoked on the listener if a VisualPort is added to a VisualNode.

Specified by:
visualPortAdded in interface VisualNodeListener

visualPortRemoved

public void visualPortRemoved(VisualNodeEvent event)
Description copied from interface: VisualNodeListener
This method is invoked on the listener if a VisualPort is removed from a VisualNode.

Specified by:
visualPortRemoved in interface VisualNodeListener
Parameters:
event - the structure that holds details about the event.

multiplex

public static VisualEdgeListener multiplex(VisualEdgeListener a,
                                           VisualEdgeListener b)
Multiplexes a VisualEdgeListener.

Parameters:
a - the first VisualEdgeListener to multiplex.
b - the second VisualEdgeListener to multiplex.
Returns:
the new root listener.

unmultiplex

public static VisualEdgeListener unmultiplex(VisualEdgeListener a,
                                             VisualEdgeListener b)
Unmultiplexes a VisualEdgeListener.

Parameters:
a - the first VisualEdgeListener to unmultiplex.
b - the second VisualEdgeListener to unmultiplex.
Returns:
the new root listener.

visualEdgeAdded

public void visualEdgeAdded(VisualEdgeEvent event)
Description copied from interface: VisualEdgeListener
This method is invoked when a VisualEdge is added.

Specified by:
visualEdgeAdded in interface VisualEdgeListener
Parameters:
event - the event structure carrying additional information.

visualEdgeRemoved

public void visualEdgeRemoved(VisualEdgeEvent event)
Description copied from interface: VisualEdgeListener
This method is invoked when a VisualEdge is removed.

Specified by:
visualEdgeRemoved in interface VisualEdgeListener
Parameters:
event - the event structure carrying additional information.

isolatedVisualEdgeAdded

public void isolatedVisualEdgeAdded(VisualEdgeEvent event)
Description copied from interface: VisualEdgeListener
This method is invoked when an isolated VisualEdge is added.

Specified by:
isolatedVisualEdgeAdded in interface VisualEdgeListener
Parameters:
event - the event structure carrying additional information.

isolatedVisualEdgeRemoved

public void isolatedVisualEdgeRemoved(VisualEdgeEvent event)
Description copied from interface: VisualEdgeListener
This method is invoked when an isolated VisualEdge is removed.

Specified by:
isolatedVisualEdgeRemoved in interface VisualEdgeListener
Parameters:
event - the event structure carrying additional information.


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