org.globus.cog.util.graph
Class GraphChangedEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.globus.cog.util.graph.GraphChangedEvent
All Implemented Interfaces:
Serializable

public class GraphChangedEvent
extends EventObject

Describes a graph event

See Also:
Serialized Form

Field Summary
static int EDGE_ADDED
           
static int EDGE_REMOVED
           
static int NODE_ADDED
           
static int NODE_REMOVED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphChangedEvent(Object source, int type)
          Constructs a GraphChangedEvent
GraphChangedEvent(Object source, int type, Edge element)
          Constructs a GraphChangedEvent
GraphChangedEvent(Object source, int type, Node element)
          Constructs a GraphChangedEvent
GraphChangedEvent(Object source, int type, Object element)
          Constructs a GraphChangedEvent
 
Method Summary
 Edge getEdge()
          Returns the edge involved in this event
 Node getNode()
          Returns the node involved in this event
 int getType()
          Returns the type of this event
protected  void setEdge(Edge edge)
           
protected  void setNode(Node node)
           
protected  void setType(int type)
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_ADDED

public static final int NODE_ADDED
See Also:
Constant Field Values

EDGE_ADDED

public static final int EDGE_ADDED
See Also:
Constant Field Values

NODE_REMOVED

public static final int NODE_REMOVED
See Also:
Constant Field Values

EDGE_REMOVED

public static final int EDGE_REMOVED
See Also:
Constant Field Values
Constructor Detail

GraphChangedEvent

public GraphChangedEvent(Object source,
                         int type,
                         Node element)
Constructs a GraphChangedEvent

Parameters:
source - the source graph
type - the type of the change
element - the node that was added/removed

GraphChangedEvent

public GraphChangedEvent(Object source,
                         int type,
                         Edge element)
Constructs a GraphChangedEvent

Parameters:
source - the source graph
type - the type of the change
element - the edge that was added/removed

GraphChangedEvent

public GraphChangedEvent(Object source,
                         int type,
                         Object element)
Constructs a GraphChangedEvent

Parameters:
source - the source graph
type - the type of the change
element - the element that was added/removed

GraphChangedEvent

public GraphChangedEvent(Object source,
                         int type)
Constructs a GraphChangedEvent

Parameters:
source - the source graph
type - the type of the event
Method Detail

setType

protected void setType(int type)

getType

public int getType()
Returns the type of this event

Returns:

getNode

public Node getNode()
Returns the node involved in this event

Returns:

setNode

protected void setNode(Node node)

getEdge

public Edge getEdge()
Returns the edge involved in this event

Returns:

setEdge

protected void setEdge(Edge edge)