org.jscience.computing.graph.events
Class GraphVertexChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.jscience.computing.graph.events.GraphChangeEvent
          extended by org.jscience.computing.graph.events.GraphVertexChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class GraphVertexChangeEvent
extends GraphChangeEvent

An event which indicates that a graph vertex has changed, or is about to change. The event can be used either as an indication after the vertex has been added or removed, or before it is added. The type of the event can be tested using the org.jscience.computing.graph.event.GraphChangeEvent#getType() method.

Since:
Aug 10, 2003
See Also:
Serialized Form

Field Summary
static int BEFORE_VERTEX_ADDED
          Before vertex added event.
static int BEFORE_VERTEX_REMOVED
          Before vertex removed event.
protected  java.lang.Object m_vertex
          The vertex that this event is related to.
static int VERTEX_ADDED
          Vertex added event.
static int VERTEX_REMOVED
          Vertex removed event.
 
Fields inherited from class org.jscience.computing.graph.events.GraphChangeEvent
m_type
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphVertexChangeEvent(java.lang.Object eventSource, int type, java.lang.Object vertex)
          Creates a new GraphVertexChangeEvent object.
 
Method Summary
 java.lang.Object getVertex()
          Returns the vertex that this event is related to.
 
Methods inherited from class org.jscience.computing.graph.events.GraphChangeEvent
getType
 
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

BEFORE_VERTEX_ADDED

public static final int BEFORE_VERTEX_ADDED
Before vertex added event. This event is fired before a vertex is added to a graph.

See Also:
Constant Field Values

BEFORE_VERTEX_REMOVED

public static final int BEFORE_VERTEX_REMOVED
Before vertex removed event. This event is fired before a vertex is removed from a graph.

See Also:
Constant Field Values

VERTEX_ADDED

public static final int VERTEX_ADDED
Vertex added event. This event is fired after a vertex is added to a graph.

See Also:
Constant Field Values

VERTEX_REMOVED

public static final int VERTEX_REMOVED
Vertex removed event. This event is fired after a vertex is removed from a graph.

See Also:
Constant Field Values

m_vertex

protected java.lang.Object m_vertex
The vertex that this event is related to.

Constructor Detail

GraphVertexChangeEvent

public GraphVertexChangeEvent(java.lang.Object eventSource,
                              int type,
                              java.lang.Object vertex)
Creates a new GraphVertexChangeEvent object.

Parameters:
eventSource - the source of the event.
type - the type of the event.
vertex - the vertex that the event is related to.
Method Detail

getVertex

public java.lang.Object getVertex()
Returns the vertex that this event is related to.

Returns:
the vertex that this event is related to.