org.graffiti.event
Class NodeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.graffiti.event.AbstractEvent
          extended by org.graffiti.event.NodeEvent
All Implemented Interfaces:
Serializable

public class NodeEvent
extends AbstractEvent

Contains a node event. A NodeEvent object is passed to every NodeListener or AbstractNodeListener object which is registered to receive the "interesting" node events using the component's addNodeListener method. (AbstractNodeListener objects implement the NodeListener interface.) Each such listener object gets a NodeEvent containing the node event.

Version:
$Revision: 5767 $
See Also:
NodeListener, AbstractNodeListener, Serialized Form

Constructor Summary
NodeEvent(Node node, Edge edge)
          Constructs a graph event object with the specified source components.
 
Method Summary
 Edge getEdge()
          Returns the edge that originated this event.
 Node getNode()
          Returns the node that has been changed by this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeEvent

public NodeEvent(Node node,
                 Edge edge)
Constructs a graph event object with the specified source components.

Parameters:
node - the node that originated the event.
edge - the edge that originated the event.
Method Detail

getEdge

public Edge getEdge()
Returns the edge that originated this event. E.g.: the edge that has been added to the incoming egdes list of the node. Might return null.

Returns:
The edge that originated the event.

getNode

public Node getNode()
Returns the node that has been changed by this event.

Returns:
The node that has been changed by this event.


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