org.jgrapht.event
Class GraphEdgeChangeEvent<V,E>

java.lang.Object
  extended by java.util.EventObject
      extended by org.jgrapht.event.GraphChangeEvent
          extended by org.jgrapht.event.GraphEdgeChangeEvent<V,E>
All Implemented Interfaces:
Serializable

public class GraphEdgeChangeEvent<V,E>
extends GraphChangeEvent

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

Since:
Aug 10, 2003
Author:
Barak Naveh
See Also:
Serialized Form

Field Summary
static int BEFORE_EDGE_ADDED
          Before edge added event.
static int BEFORE_EDGE_REMOVED
          Before edge removed event.
protected  E edge
          The edge that this event is related to.
static int EDGE_ADDED
          Edge added event.
static int EDGE_REMOVED
          Edge removed event.
protected  V edgeSource
          The source vertex of the edge that this event is related to.
protected  V edgeTarget
          The target vertex of the edge that this event is related to.
 
Fields inherited from class org.jgrapht.event.GraphChangeEvent
type
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphEdgeChangeEvent(Object eventSource, int type, E edge)
          Deprecated. Use new constructor which takes vertex parameters.
GraphEdgeChangeEvent(Object eventSource, int type, E edge, V edgeSource, V edgeTarget)
          Constructor for GraphEdgeChangeEvent.
 
Method Summary
 E getEdge()
          Returns the edge that this event is related to.
 V getEdgeSource()
          Returns the source vertex that this event is related to.
 V getEdgeTarget()
          Returns the target vertex that this event is related to.
 
Methods inherited from class org.jgrapht.event.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_EDGE_ADDED

public static final int BEFORE_EDGE_ADDED
Before edge added event. This event is fired before an edge is added to a graph.

See Also:
Constant Field Values

BEFORE_EDGE_REMOVED

public static final int BEFORE_EDGE_REMOVED
Before edge removed event. This event is fired before an edge is removed from a graph.

See Also:
Constant Field Values

EDGE_ADDED

public static final int EDGE_ADDED
Edge added event. This event is fired after an edge is added to a graph.

See Also:
Constant Field Values

EDGE_REMOVED

public static final int EDGE_REMOVED
Edge removed event. This event is fired after an edge is removed from a graph.

See Also:
Constant Field Values

edge

protected E edge
The edge that this event is related to.


edgeSource

protected V edgeSource
The source vertex of the edge that this event is related to.


edgeTarget

protected V edgeTarget
The target vertex of the edge that this event is related to.

Constructor Detail

GraphEdgeChangeEvent

public GraphEdgeChangeEvent(Object eventSource,
                            int type,
                            E edge)
Deprecated. Use new constructor which takes vertex parameters.

Constructor for GraphEdgeChangeEvent.

Parameters:
eventSource - the source of this event.
type - the event type of this event.
edge - the edge that this event is related to.

GraphEdgeChangeEvent

public GraphEdgeChangeEvent(Object eventSource,
                            int type,
                            E edge,
                            V edgeSource,
                            V edgeTarget)
Constructor for GraphEdgeChangeEvent.

Parameters:
eventSource - the source of this event.
type - the event type of this event.
edge - the edge that this event is related to.
edgeSource - edge source vertex
edgeTarget - edge target vertex
Method Detail

getEdge

public E getEdge()
Returns the edge that this event is related to.

Returns:
event edge

getEdgeSource

public V getEdgeSource()
Returns the source vertex that this event is related to.

Returns:
event source vertex

getEdgeTarget

public V getEdgeTarget()
Returns the target vertex that this event is related to.

Returns:
event target vertex


Copyright © 2013. All rights reserved.