beowulf.event
Class GraphSelectionEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bybeowulf.event.GraphSelectionEvent
All Implemented Interfaces:
Serializable

public class GraphSelectionEvent
extends EventObject

This class is the event that is generated whenever a JNode is selected. The interested listener should be registered to the JGraph.

Version:
1.0 - Feb 18, 2004
Author:
ags
See Also:
Serialized Form

Field Summary
static int NODE_DESELECTED
          Indicates a node was deselected.
static int NODE_SELECTED
          Indicates a node was selected.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphSelectionEvent(Object source, int newEventType, Object newValue)
          The only constructor for this event.
 
Method Summary
 int getEventType()
          Returns the type of event.
 Object getValue()
          Returns the node whose status changed.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_SELECTED

public static final int NODE_SELECTED
Indicates a node was selected.

See Also:
Constant Field Values

NODE_DESELECTED

public static final int NODE_DESELECTED
Indicates a node was deselected.

See Also:
Constant Field Values
Constructor Detail

GraphSelectionEvent

public GraphSelectionEvent(Object source,
                           int newEventType,
                           Object newValue)
The only constructor for this event. Sets all fields.

Parameters:
source - The JGraph which fired the event.
newEventType - The type of event - node selected or node deselected.
newValue - The node whose value changed.
Method Detail

getValue

public Object getValue()
Returns the node whose status changed.

Returns:
The node whose status changed.

getEventType

public int getEventType()
Returns the type of event.

Returns:
The type of event.

toString

public String toString()