com.tensegrity.graph.event
Class NodeEvent

java.lang.Object
  extended bycom.tensegrity.graph.event.AbstractGraphEvent
      extended bycom.tensegrity.graph.event.NodeEvent
All Implemented Interfaces:
GraphRootEvent

public class NodeEvent
extends com.tensegrity.graph.event.AbstractGraphEvent

The node event class.

Version:
$Id: NodeEvent.java,v 1.9 2004/05/05 08:00:07 sr Exp $
Author:
Stepan Rutz
See Also:
Graph, Node

Field Summary
static int NODE_ADDED
          Constants that define the type of the event.
static int NODE_REMOVED
          Constants that define the type of the event.
static int PORT_ADDED
          Constants that define the type of the event.
static int PORT_REMOVED
          Constants that define the type of the event.
 
Constructor Summary
NodeEvent(int id, Graph graph, Node node)
          Constructs a new NodeEvent.
NodeEvent(int id, Graph graph, Node node, Port port)
          Constructs a new NodeEvent.
NodeEvent(int id, Subgraph subgraph, Node node)
          Constructs a new NodeEvent.
NodeEvent(int id, Subgraph subgraph, Node node, Port port)
          Constructs a new NodeEvent.
 
Method Summary
 java.lang.String getDescription()
          Returns a textual description for the event.
 Graph getGraph()
          Returns the Graph that caused the event.
 int getID()
          Returns the event id of this event.
 Node getNode()
          Returns the Node that caused the event.
 Port getPort()
          Returns the Port that is involved in the event if any.
 Subgraph getSubgraph()
          Returns the Subgraph that caused the event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE_ADDED

public static final int NODE_ADDED
Constants that define the type of the event.

See Also:
Constant Field Values

NODE_REMOVED

public static final int NODE_REMOVED
Constants that define the type of the event.

See Also:
Constant Field Values

PORT_ADDED

public static final int PORT_ADDED
Constants that define the type of the event.

See Also:
Constant Field Values

PORT_REMOVED

public static final int PORT_REMOVED
Constants that define the type of the event.

See Also:
Constant Field Values
Constructor Detail

NodeEvent

public NodeEvent(int id,
                 Graph graph,
                 Node node)
Constructs a new NodeEvent.

Parameters:
id - the type of the event.
graph - the Graph that is associated with the event.
node - the Node that is associated with the event.

NodeEvent

public NodeEvent(int id,
                 Subgraph subgraph,
                 Node node)
Constructs a new NodeEvent.

Parameters:
id - the type of the event.
subgraph - the Subgraph that is associated with the event.
node - the Node that is associated with the event.

NodeEvent

public NodeEvent(int id,
                 Graph graph,
                 Node node,
                 Port port)
Constructs a new NodeEvent.

Parameters:
id - the type of the event.
graph - the Graph that is associated with the event.
node - the Node that is associated with the event.
port - the Port that is involved in the event.

NodeEvent

public NodeEvent(int id,
                 Subgraph subgraph,
                 Node node,
                 Port port)
Constructs a new NodeEvent.

Parameters:
id - the type of the event.
subgraph - the Subgraph that is associated with the event.
node - the Node that is associated with the event.
port - the Port that is involved in the event.
Method Detail

getID

public int getID()
Returns the event id of this event.

Returns:
the event id of this event.

getNode

public Node getNode()
Returns the Node that caused the event.

Returns:
the Node that caused the event.

getPort

public Port getPort()
Returns the Port that is involved in the event if any. If no port is involved then null is returned.

Returns:
the Port that is involved in the event or null.

getDescription

public java.lang.String getDescription()
Returns a textual description for the event.

Specified by:
getDescription in interface GraphRootEvent
Returns:
a textual description for the event.

getGraph

public Graph getGraph()
Returns the Graph that caused the event.

Specified by:
getGraph in interface GraphRootEvent
Returns:
the Graph that caused the event.

getSubgraph

public Subgraph getSubgraph()
Returns the Subgraph that caused the event.

Returns:
the Subgraph that caused the event.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.