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 Details

    • AbstractNodeListener

      public AbstractNodeListener()
  • Method Details

    • 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.)
      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.)
      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.)
      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.)
      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.)
      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.)
      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.)
      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.)
      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.
      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.