Package org.graffiti.event
Class AbstractNodeListener
java.lang.Object
org.graffiti.event.AbstractNodeListener
- All Implemented Interfaces:
EventListener,NodeListener,TransactionListener
public abstract class AbstractNodeListener extends Object implements NodeListener
An abstract adapter class for receiving node events. The methods in this
class are empty. This class exists as convenience for creating listener
objects.
Extend this class to create a NodeEvent listener and override
the methods for the events of interest. (If you implement the
NodeListener 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 addNodeEventListener method.
When a node is added, removed or the edge of a node is added ore removed, a
transaction of graph structure changes is started or finished, the relevant
method in the listener object is invoked and the NodeEvent is
passed to it.
- Version:
- $Revision: 1.4 $
- See Also:
ListenerManager,NodeEvent
-
Constructor Summary
Constructors Constructor Description AbstractNodeListener() -
Method Summary
Modifier and Type Method Description voidpostInEdgeAdded(NodeEvent e)Called just after an incoming edge has been added to the node.voidpostInEdgeRemoved(NodeEvent e)Called after an incoming edge has been removed from the node.voidpostOutEdgeAdded(NodeEvent e)Called after an outgoing edge has been added to the node.voidpostOutEdgeRemoved(NodeEvent e)Called after an outgoing edge has been removed from the node.voidpostUndirectedEdgeAdded(NodeEvent e)Called after an (undirected) edge has been added to the node.voidpostUndirectedEdgeRemoved(NodeEvent e)Called after an (undirected) edge has been removed from the node.voidpreInEdgeAdded(NodeEvent e)Called just before an incoming edge is added to the node.voidpreInEdgeRemoved(NodeEvent e)Called just before an incoming edge is removed from the node.voidpreOutEdgeAdded(NodeEvent e)Called just before an outgoing edge is added to the node.voidpreOutEdgeRemoved(NodeEvent e)Called just before an outgoing edge is removed from the node.voidpreUndirectedEdgeAdded(NodeEvent e)Called just before an (undirected) edge is added to the node.voidpreUndirectedEdgeRemoved(NodeEvent e)Called just before an (undirected) edge is removed from the node.voidtransactionFinished(TransactionEvent e)Called after a transaction has been finished.voidtransactionStarted(TransactionEvent e)Called after a transaction has been started.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graffiti.event.TransactionListener
transactionFinished
-
Constructor Details
-
AbstractNodeListener
public AbstractNodeListener()
-
-
Method Details
-
postInEdgeAdded
Called just after an incoming edge has been added to the node. (For undirected edges postUndirectedEdgeAdded is called instead.)- Parameters:
e- The NodeEvent detailing the changes.
-
postInEdgeRemoved
Called after an incoming edge has been removed from the node. (For undirected edges postUndirectedEdgeRemoved is called.)- Parameters:
e- The NodeEvent detailing the changes.
-
postOutEdgeAdded
Called after an outgoing edge has been added to the node. (For undirected edges postUndirectedEdgeAdded is called instead.)- Parameters:
e- The NodeEvent detailing the changes.
-
postOutEdgeRemoved
Called after an outgoing edge has been removed from the node. (For undirected edges postUndirectedEdgeRemoved is called.)- Parameters:
e- The NodeEvent detailing the changes.
-
postUndirectedEdgeAdded
Called after an (undirected) edge has been added to the node. (For directed edges pre- In/Out- EdgeAdded is called.)- Specified by:
postUndirectedEdgeAddedin interfaceNodeListener- Parameters:
e- The NodeEvent detailing the changes.
-
postUndirectedEdgeRemoved
Called after an (undirected) edge has been removed from the node. (For directed edges pre- In/Out- EdgeRemoved is called.)- Specified by:
postUndirectedEdgeRemovedin interfaceNodeListener- Parameters:
e- The NodeEvent detailing the changes.
-
preInEdgeAdded
Called just before an incoming edge is added to the node. (For undirected edges preUndirectedEdgeAdded is called instead.)- Parameters:
e- The NodeEvent detailing the changes.
-
preInEdgeRemoved
Called just before an incoming edge is removed from the node. (For undirected edges preUndirectedEdgeRemoved is called.)- Parameters:
e- The NodeEvent detailing the changes.
-
preOutEdgeAdded
Called just before an outgoing edge is added to the node. (For undirected edges preUndirectedEdgeAdded is called instead.)- Parameters:
e- The NodeEvent detailing the changes.
-
preOutEdgeRemoved
Called just before an outgoing edge is removed from the node. (For undirected edges preUndirectedEdgeRemoved is called.)- Parameters:
e- The NodeEvent detailing the changes.
-
preUndirectedEdgeAdded
Called just before an (undirected) edge is added to the node. (For directed edges pre- In/Out- EdgeAdded is called.)- Specified by:
preUndirectedEdgeAddedin interfaceNodeListener- Parameters:
e- The NodeEvent detailing the changes.
-
preUndirectedEdgeRemoved
Called just before an (undirected) edge is removed from the node. (For directed edges pre- In/Out- EdgeRemoved is called.)- Specified by:
preUndirectedEdgeRemovedin interfaceNodeListener- Parameters:
e- The NodeEvent 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:
transactionStartedin interfaceTransactionListener- Parameters:
e- gives details about the transaction.
-