|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
diva.graphx.event.GraphEvent
public class GraphEvent
A graph event that is emitted when anything interesting happens inside a graph by way of a GraphModel. The source of a graph event is the object which caused the change to the graph model, such as a particular controller of the graph or a user algorithm.
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 FormField Summary | |
---|---|
static int |
EDGE_ADDED
An edge is added to a graph; target is the edge, old value is the previous parent |
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_REMOVED
An edge is deleted from a graph; target is the node, old value is the previous parent |
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 |
static int |
NODE_REMOVED
A node is deleted from a graph; target is the node, old value is the previous parent |
static int |
STRUCTURE_CHANGED
Graph is modified signficantly and should be fully "refreshed"; target is the graph, old value is null. |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
GraphEvent(Object source,
int id,
Object target)
Construct a GraphEvent with the given source and target and a null previous value. |
|
GraphEvent(Object source,
int id,
Object target,
Object oldValue)
Construct a GraphEvent with the given source, target, and previous value. |
Method Summary | |
---|---|
int |
getID()
Return the type id for this event. |
Object |
getOldValue()
Return the old value, which is event-specific. |
Object |
getTarget()
Return the target value, which is event-specific. |
String |
toString()
Return a string representation of this event. |
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int EDGE_HEAD_CHANGED
public static final int EDGE_TAIL_CHANGED
public static final int EDGE_ADDED
public static final int EDGE_REMOVED
public static final int NODE_ADDED
public static final int NODE_REMOVED
public static final int STRUCTURE_CHANGED
Constructor Detail |
---|
public GraphEvent(Object source, int id, Object target)
public GraphEvent(Object source, int id, Object target, Object oldValue)
Method Detail |
---|
public int getID()
public Object getTarget()
public Object getOldValue()
public String toString()
toString
in class EventObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |