com.tensegrity.graph.event
Class VisualNodeEvent

java.lang.Object
  extended bycom.tensegrity.graph.event.AbstractVisualGraphEvent
      extended bycom.tensegrity.graph.event.VisualNodeEvent
All Implemented Interfaces:
VisualGraphRootEvent

public class VisualNodeEvent
extends com.tensegrity.graph.event.AbstractVisualGraphEvent

This event handles events that occur on a per-VisualNode basis.

Version:
$Id: VisualNodeEvent.java,v 1.7 2004/05/05 10:51:29 sr Exp $
Author:
Stepan Rutz
See Also:
VisualNode

Field Summary
static int VISUALNODE_ADDED
          Constants that define the type of the event.
static int VISUALNODE_REMOVED
          Constants that define the type of the event.
static int VISUALPORT_ADDED
          Constants that define the type of the event.
static int VISUALPORT_REMOVED
          Constants that define the type of the event.
 
Constructor Summary
VisualNodeEvent(int id, VisualGraph visualgraph, VisualNode visualnode)
          Constructs a new VisualNodeEvent instance.
VisualNodeEvent(int id, VisualGraph visualgraph, VisualNode visualnode, VisualPort visualport)
          Constructs a new VisualNodeEvent instance.
VisualNodeEvent(int id, VisualSubgraph visualsubgraph, VisualNode visualnode)
          Constructs a new VisualNodeEvent instance.
VisualNodeEvent(int id, VisualSubgraph visualsubgraph, VisualNode visualnode, VisualPort visualport)
          Constructs a new VisualNodeEvent instance.
 
Method Summary
 java.lang.String getDescription()
          Returns a textual description for the event.
 int getID()
          Returns the event id of this event.
 VisualGraph getVisualGraph()
          Returns the VisualGraph that caused the event.
 VisualNode getVisualNode()
          Returns the VisualNode that is associated with the event.
 VisualPort getVisualPort()
          Returns the VisualPort that is associated with the event.
 VisualSubgraph getVisualSubgraph()
          Returns the VisualSubgraph that caused the event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VISUALNODE_ADDED

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

See Also:
Constant Field Values

VISUALNODE_REMOVED

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

See Also:
Constant Field Values

VISUALPORT_ADDED

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

See Also:
Constant Field Values

VISUALPORT_REMOVED

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

See Also:
Constant Field Values
Constructor Detail

VisualNodeEvent

public VisualNodeEvent(int id,
                       VisualGraph visualgraph,
                       VisualNode visualnode)
Constructs a new VisualNodeEvent instance.

Parameters:
id - the type of this event.
visualgraph - the associated VisualGraph of the event.
visualnode - the associated VisualNode of the event.

VisualNodeEvent

public VisualNodeEvent(int id,
                       VisualSubgraph visualsubgraph,
                       VisualNode visualnode)
Constructs a new VisualNodeEvent instance.

Parameters:
id - the type of this event.
visualsubgraph - the associated VisualSubgraph of the event. This may be null if the event did not occur in a subgraph.
visualnode - the associated VisualNode of the event.

VisualNodeEvent

public VisualNodeEvent(int id,
                       VisualGraph visualgraph,
                       VisualNode visualnode,
                       VisualPort visualport)
Constructs a new VisualNodeEvent instance.

Parameters:
id - the type of this event.
visualgraph - the associated VisualGraph of the event.
visualnode - the associated VisualNode of the event.

VisualNodeEvent

public VisualNodeEvent(int id,
                       VisualSubgraph visualsubgraph,
                       VisualNode visualnode,
                       VisualPort visualport)
Constructs a new VisualNodeEvent instance.

Parameters:
id - the type of this event.
visualsubgraph - the associated VisualSubgraph of the event. This may be null if the event did not occur in a subgraph.
visualnode - the associated VisualNode of the event.
Method Detail

getID

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

Returns:
the event id of this event.

getVisualNode

public VisualNode getVisualNode()
Returns the VisualNode that is associated with the event.

Returns:
the VisualNode that is associated with the event.

getVisualPort

public VisualPort getVisualPort()
Returns the VisualPort that is associated with the event. If none is associated then null is returned.

Returns:
the VisualPort that is associated with the event.

getVisualGraph

public VisualGraph getVisualGraph()
Returns the VisualGraph that caused the event.

If the event source was not of the type VisualGraph then this method returns null.

Specified by:
getVisualGraph in interface VisualGraphRootEvent
Returns:
the VisualGraph that caused the event.

getVisualSubgraph

public VisualSubgraph getVisualSubgraph()
Returns the VisualSubgraph that caused the event.

If the event source was not of the type VisualSubgraph then this method returns null.

Returns:
the VisualSubgraph that caused the event.

getDescription

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

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


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