public class GraphEvent
extends java.util.EventObject
Each graph event contains an ID and a previous value for all changes and deletions, the specifics of which are described on a case-by-case basis below.
GraphModel
,
Serialized FormYellow |
Modifier and Type | Field and Description |
---|---|
static int |
EDGE_HEAD_CHANGED
Edge head is changed; target is the edge, old value is the
previous value of the edge head.
|
static int |
EDGE_TAIL_CHANGED
Edge tail is changed; target is the edge, old value is the
previous value of the edge tail.
|
static int |
NODE_ADDED
A node is added to a graph; target is the
node, old value is the previous parent of the graph.
|
static int |
NODE_REMOVED
A node is deleted from a graph; target is the
node, old value is the previous parent of the graph.
|
static int |
STRUCTURE_CHANGED
Graph is modified significantly and should
be fully "refreshed"; target is the
graph, old value is null.
|
Constructor and Description |
---|
GraphEvent(java.lang.Object source,
int id,
java.lang.Object target)
Construct a GraphEvent with the given source and target
and a null previous value.
|
GraphEvent(java.lang.Object source,
int id,
java.lang.Object target,
java.lang.Object oldValue)
Construct a GraphEvent with the given
source, target, and previous value.
|
Modifier and Type | Method and Description |
---|---|
int |
getID()
Return the type id for this event.
|
java.lang.Object |
getOldValue()
Return the old value, which is event-specific.
|
java.lang.Object |
getTarget()
Return the target value, which is event-specific.
|
java.lang.String |
toString()
Return a string representation of this event.
|
public static final int EDGE_HEAD_CHANGED
public static final int EDGE_TAIL_CHANGED
public static final int NODE_ADDED
public static final int NODE_REMOVED
public static final int STRUCTURE_CHANGED
public GraphEvent(java.lang.Object source, int id, java.lang.Object target)
public GraphEvent(java.lang.Object source, int id, java.lang.Object target, java.lang.Object oldValue)
public int getID()
public java.lang.Object getTarget()
public java.lang.Object getOldValue()
public java.lang.String toString()
toString
in class java.util.EventObject