|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.event.GraphEventMediator
The GraphEventMediator facilitates to gain access to all
Graph events, Node events and Edge
events.
To be informed about all occuring events an object has to implement the
GraphEventMediatorListener interface and then registered
at a Graph instance as event mediator listener.
The GraphEventMediator is allways an instance variable of
a Graph and hasn't to be implemented nor registered
to any instance of a GraphObject.
This is a mandatory commandment!
An implementation of a Graph allways comes with its
own GraphEventMediator implementation, which is a major
part of the architecture.
Graph,
GraphEventMediatorListener| Constructor Summary | |
GraphEventMediator()
Constructor for GraphEventMediator. |
|
| Method Summary | |
void |
addMediatorListener(GraphEventMediatorListener listener)
Adds the GraphEventMediatorListener given by
listener to the GraphEventMediator
instance such that the listener will be notified about every event that
occurs. |
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. |
java.util.List |
getListeners()
Returns a List of the
GraphEventMediatorListeners currently registered. |
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. |
void |
removeMediatorListener(GraphEventMediatorListener listener)
Removes the GraphEventMediatorListener given by
listener from the GraphEventMediator
instance such that the listener will no longer be notified about
occuring events. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GraphEventMediator()
| Method Detail |
public void addMediatorListener(GraphEventMediatorListener listener)
GraphEventMediatorListener given by
listener to the GraphEventMediator
instance such that the listener will be notified about every event that
occurs.
listener - the GraphEventMediatorListener to
addpublic void removeMediatorListener(GraphEventMediatorListener listener)
GraphEventMediatorListener given by
listener from the GraphEventMediator
instance such that the listener will no longer be notified about
occuring events.
listener - the GraphEventMediatorListener to
removepublic java.util.List getListeners()
List of the
GraphEventMediatorListeners currently registered.
public void nodePreAdd(GraphEvent graphevent)
GraphListener
nodePreAdd in interface GraphListenerpublic void nodeAdded(GraphEvent graphevent)
GraphListener
nodeAdded in interface GraphListenergraphevent - the graphevent structure carrying graphevent information.public void nodePreRemove(GraphEvent graphevent)
GraphListener
nodePreRemove in interface GraphListenergraphevent - the structure carrying graphevent information.public void nodeRemoved(GraphEvent graphevent)
GraphListener
nodeRemoved in interface GraphListenergraphevent - the structure carrying graphevent information.public void edgePreAdd(GraphEvent graphevent)
GraphListener
edgePreAdd in interface GraphListenergraphevent - the structure carrying graphevent information.public void edgeAdded(GraphEvent graphevent)
GraphListener
edgeAdded in interface GraphListenergraphevent - the structure carrying graphevent information.public void edgePreRemove(GraphEvent graphevent)
GraphListener
edgePreRemove in interface GraphListenergraphevent - the structure carrying graphevent information.public void edgeRemoved(GraphEvent graphevent)
GraphListener
edgeRemoved in interface GraphListenergraphevent - the structure carrying graphevent information.public void edgeAttachRejected(GraphEvent graphevent)
GraphListener
edgeAttachRejected in interface GraphListenergraphevent - the structure carrying graphevent information.public void edgePreSplit(GraphEvent graphevent)
GraphListener
edgePreSplit in interface GraphListenergraphevent - the structure carrying graphevent information.public void edgeSplit(GraphEvent graphevent)
GraphListener
edgeSplit in interface GraphListenergraphevent - the structure carrying graphevent information.public void nodePreDeleteEdgeCascade(GraphEvent graphevent)
GraphListener
nodePreDeleteEdgeCascade in interface GraphListenergraphevent - the structure carrying graphevent information.public void nodeDeleteEdgeCascade(GraphEvent graphevent)
GraphListener
nodeDeleteEdgeCascade in interface GraphListenergraphevent - the structure carrying graphevent information.public void nodeAddedToGraph(NodeEvent nodeevent)
NodeListenerNode was added to the
graph.
nodeAddedToGraph in interface NodeListenernodeevent - the event structure that carries details about
the event.public void nodeRemovedFromGraph(NodeEvent nodeevent)
NodeListenerNode
was removed from the graph
#
nodeRemovedFromGraph in interface NodeListenernodeevent - the event structure that carries details about
the event.public void portAddedToNode(NodeEvent nodeevent)
NodeListenerPort is added
to a
Node.
portAddedToNode in interface NodeListenernodeevent - the event structure that carries details about
the event.public void portRemovedFromNode(NodeEvent nodeevent)
NodeListenerPort is removed
from a
Node.
portRemovedFromNode in interface NodeListenernodeevent - the event structure that carries details about
the event.public void edgeAddedToGraph(EdgeEvent edgeevent)
EdgeListenerEdge
was added to the graph.
edgeAddedToGraph in interface EdgeListeneredgeevent - the event structure that carries details about
the event.public void edgeRemovedFromGraph(EdgeEvent edgeevent)
EdgeListenerEdge
was removed from the graph.
edgeRemovedFromGraph in interface EdgeListeneredgeevent - the event structure that carries details about
the event.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||