org._3pq.jgrapht.event

Class GraphEdgeChangeEvent


public class GraphEdgeChangeEvent
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.
Author:
Barak Naveh
Since:
Aug 10, 2003

Field Summary

static int
BEFORE_EDGE_ADDED
Before edge added event.
static int
BEFORE_EDGE_REMOVED
Before edge removed event.
static int
EDGE_ADDED
Edge added event.
static int
EDGE_REMOVED
Edge removed event.
protected Edge
m_edge
The edge that this event is related to.

Fields inherited from class org._3pq.jgrapht.event.GraphChangeEvent

m_type

Constructor Summary

GraphEdgeChangeEvent(Object eventSource, int type, Edge e)
Constructor for GraphEdgeChangeEvent.

Method Summary

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

Methods inherited from class org._3pq.jgrapht.event.GraphChangeEvent

getType

Field Details

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.
Field Value:
21

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.
Field Value:
22

EDGE_ADDED

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

EDGE_REMOVED

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

m_edge

protected Edge m_edge
The edge that this event is related to.

Constructor Details

GraphEdgeChangeEvent

public GraphEdgeChangeEvent(Object eventSource,
                            int type,
                            Edge e)
Constructor for GraphEdgeChangeEvent.
Parameters:
eventSource - the source of this event.
type - the event type of this event.
e - the edge that this event is related to.

Method Details

getEdge

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