org.graffiti.event
Class AbstractNodeListener

java.lang.Object
  extended by 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: 5767 $
See Also:
ListenerManager, NodeEvent

Constructor Summary
AbstractNodeListener()
           
 
Method Summary
 void postInEdgeAdded(NodeEvent e)
          Called just after an incoming edge has been added to the node.
 void postInEdgeRemoved(NodeEvent e)
          Called after an incoming edge has been removed from the node.
 void postOutEdgeAdded(NodeEvent e)
          Called after an outgoing edge has been added to the node.
 void postOutEdgeRemoved(NodeEvent e)
          Called after an outgoing edge has been removed from the node.
 void postUndirectedEdgeAdded(NodeEvent e)
          Called after an (undirected) edge has been added to the node.
 void postUndirectedEdgeRemoved(NodeEvent e)
          Called after an (undirected) edge has been removed from the node.
 void preInEdgeAdded(NodeEvent e)
          Called just before an incoming edge is added to the node.
 void preInEdgeRemoved(NodeEvent e)
          Called just before an incoming edge is removed from the node.
 void preOutEdgeAdded(NodeEvent e)
          Called just before an outgoing edge is added to the node.
 void preOutEdgeRemoved(NodeEvent e)
          Called just before an outgoing edge is removed from the node.
 void preUndirectedEdgeAdded(NodeEvent e)
          Called just before an (undirected) edge is added to the node.
 void preUndirectedEdgeRemoved(NodeEvent e)
          Called just before an (undirected) edge is removed from the node.
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNodeListener

public AbstractNodeListener()
Method Detail

postInEdgeAdded

public void postInEdgeAdded(NodeEvent e)
Called just after an incoming edge has been added to the node. (For undirected edges postUndirectedEdgeAdded is called instead.)

Specified by:
postInEdgeAdded in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

postInEdgeRemoved

public void postInEdgeRemoved(NodeEvent e)
Called after an incoming edge has been removed from the node. (For undirected edges postUndirectedEdgeRemoved is called.)

Specified by:
postInEdgeRemoved in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

postOutEdgeAdded

public void postOutEdgeAdded(NodeEvent e)
Called after an outgoing edge has been added to the node. (For undirected edges postUndirectedEdgeAdded is called instead.)

Specified by:
postOutEdgeAdded in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

postOutEdgeRemoved

public void postOutEdgeRemoved(NodeEvent e)
Called after an outgoing edge has been removed from the node. (For undirected edges postUndirectedEdgeRemoved is called.)

Specified by:
postOutEdgeRemoved in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

postUndirectedEdgeAdded

public void postUndirectedEdgeAdded(NodeEvent e)
Called after an (undirected) edge has been added to the node. (For directed edges pre- In/Out- EdgeAdded is called.)

Specified by:
postUndirectedEdgeAdded in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

postUndirectedEdgeRemoved

public void postUndirectedEdgeRemoved(NodeEvent e)
Called after an (undirected) edge has been removed from the node. (For directed edges pre- In/Out- EdgeRemoved is called.)

Specified by:
postUndirectedEdgeRemoved in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

preInEdgeAdded

public void preInEdgeAdded(NodeEvent e)
Called just before an incoming edge is added to the node. (For undirected edges preUndirectedEdgeAdded is called instead.)

Specified by:
preInEdgeAdded in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

preInEdgeRemoved

public void preInEdgeRemoved(NodeEvent e)
Called just before an incoming edge is removed from the node. (For undirected edges preUndirectedEdgeRemoved is called.)

Specified by:
preInEdgeRemoved in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

preOutEdgeAdded

public void preOutEdgeAdded(NodeEvent e)
Called just before an outgoing edge is added to the node. (For undirected edges preUndirectedEdgeAdded is called instead.)

Specified by:
preOutEdgeAdded in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

preOutEdgeRemoved

public void preOutEdgeRemoved(NodeEvent e)
Called just before an outgoing edge is removed from the node. (For undirected edges preUndirectedEdgeRemoved is called.)

Specified by:
preOutEdgeRemoved in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

preUndirectedEdgeAdded

public void preUndirectedEdgeAdded(NodeEvent e)
Called just before an (undirected) edge is added to the node. (For directed edges pre- In/Out- EdgeAdded is called.)

Specified by:
preUndirectedEdgeAdded in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

preUndirectedEdgeRemoved

public void preUndirectedEdgeRemoved(NodeEvent e)
Called just before an (undirected) edge is removed from the node. (For directed edges pre- In/Out- EdgeRemoved is called.)

Specified by:
preUndirectedEdgeRemoved in interface NodeListener
Parameters:
e - The NodeEvent detailing the changes.

transactionFinished

public void transactionFinished(TransactionEvent e)
Called after a transaction has been finished.

Specified by:
transactionFinished in interface TransactionListener
Parameters:
e - gives details about the transaction.

transactionStarted

public void transactionStarted(TransactionEvent e)
Called after a transaction has been started.

Specified by:
transactionStarted in interface TransactionListener
Parameters:
e - gives details about the transaction.


Generated at 2012-05-30 11:00:36 PM CEST