Class AbstractEdgeListener
- All Implemented Interfaces:
EventListener
,EdgeListener
,TransactionListener
public abstract class AbstractEdgeListener extends Object implements EdgeListener
Extend this class to create a EdgeEvent
listener and override
the methods for the events of interest. (If you implement the
EdgeListener
interface, you have to define all of the methods in
it. This abstract class defines null
methods for them all, so
you can only have to define methods for events you care about.)
Create a listener object using the extended class and then register it with a
component using the component's addEdgeEventListener
method.
When the structure of the graph is changed (e.g.: an edge is added, reversed,
an edge's source or target node changes, or an edge is removed) or a
transaction of graph structure changes is started or finished, the relevant
method in the listener object is invoked and the EdgeEvent
is
passed to it.
- Version:
- $Revision: 1.4 $
- See Also:
ListenerManager
,EdgeEvent
-
Constructor Summary
Constructors Constructor Description AbstractEdgeListener()
-
Method Summary
Modifier and Type Method Description void
postDirectedChanged(EdgeEvent e)
Called after the edge was set directed or undirected.void
postEdgeReversed(EdgeEvent e)
Called after the edge has been reversed.void
postSourceNodeChanged(EdgeEvent e)
Called after the source node of an edge has changed.void
postTargetNodeChanged(EdgeEvent e)
Called after the target node of an edge has changed.void
preDirectedChanged(EdgeEvent e)
Called before the edge is set directed or undirected.void
preEdgeReversed(EdgeEvent e)
Called before the edge is going to be reversed.void
preSourceNodeChanged(EdgeEvent e)
Called before a change of the source node of an edge takes place.void
preTargetNodeChanged(EdgeEvent e)
Called before a change of the target node of an edge takes place.void
transactionFinished(TransactionEvent e)
Called after a transaction has been finished.void
transactionStarted(TransactionEvent e)
Called after a transaction has been started.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.graffiti.event.TransactionListener
transactionFinished
-
Constructor Details
-
AbstractEdgeListener
public AbstractEdgeListener()
-
-
Method Details
-
postDirectedChanged
Called after the edge was set directed or undirected.- Specified by:
postDirectedChanged
in interfaceEdgeListener
- Parameters:
e
- the EdgeEvent detailing the changes.
-
postEdgeReversed
Called after the edge has been reversed.- Specified by:
postEdgeReversed
in interfaceEdgeListener
- Parameters:
e
- the EdgeEvent detailing the changes.
-
postSourceNodeChanged
Called after the source node of an edge has changed.- Specified by:
postSourceNodeChanged
in interfaceEdgeListener
- Parameters:
e
- the EdgeEvent detailing the changes.
-
postTargetNodeChanged
Called after the target node of an edge has changed.- Specified by:
postTargetNodeChanged
in interfaceEdgeListener
- Parameters:
e
- the EdgeEvent detailing the changes.
-
preDirectedChanged
Called before the edge is set directed or undirected.- Specified by:
preDirectedChanged
in interfaceEdgeListener
- Parameters:
e
- the EdgeEvent detailing the changes.
-
preEdgeReversed
Called before the edge is going to be reversed.- Specified by:
preEdgeReversed
in interfaceEdgeListener
- Parameters:
e
- the EdgeEvent detailing the changes.
-
preSourceNodeChanged
Called before a change of the source node of an edge takes place.- Specified by:
preSourceNodeChanged
in interfaceEdgeListener
- Parameters:
e
- the EdgeEvent detailing the changes.
-
preTargetNodeChanged
Called before a change of the target node of an edge takes place.- Specified by:
preTargetNodeChanged
in interfaceEdgeListener
- Parameters:
e
- the EdgeEvent detailing the changes.
-
transactionFinished
Called after a transaction has been finished.- Parameters:
e
- gives details about the transaction.
-
transactionStarted
Called after a transaction has been started.- Specified by:
transactionStarted
in interfaceTransactionListener
- Parameters:
e
- gives details about the transaction.
-