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 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
postUndirectedEdgeAdded
in 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:
postUndirectedEdgeRemoved
in 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:
preUndirectedEdgeAdded
in 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:
preUndirectedEdgeRemoved
in 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:
transactionStarted
in interfaceTransactionListener
- Parameters:
e
- gives details about the transaction.
-