Package diva.graph
Class GraphViewEvent
- java.lang.Object
-
- java.util.EventObject
-
- diva.graph.GraphViewEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class GraphViewEvent extends java.util.EventObjectA graph view event that is emitted when anything interesting happens inside a graph view. The source of a event is the GraphController that issued the event.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.
- Version:
- $Id$
- Author:
- Michael Shilman, Steve Neuendorffer
- See Also:
GraphController, Serialized Form- Pt.AcceptedRating:
- Red
-
-
Field Summary
Fields Modifier and Type Field Description static intEDGE_DRAWNThe given edge was just drawn.static intEDGE_ROUTEDThe connector representing an edge was just routed.static intNODE_DRAWNThe given node was just drawn.static intNODE_MOVEDThe figure representing a node was moved.
-
Constructor Summary
Constructors Constructor Description GraphViewEvent(java.lang.Object source, int id, java.lang.Object target)Construct a GraphViewEvent with the given source and target and a null previous value.GraphViewEvent(java.lang.Object source, int id, java.lang.Object target, java.lang.Object oldValue)Construct a GraphViewEvent with the given source, target, and previous value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetID()Return the type id for this event.java.lang.ObjectgetOldValue()Return the old value, which is event-specific.java.lang.ObjectgetTarget()Return the target value, which is event-specific.java.lang.StringtoString()Return a string representation of this event.
-
-
-
Field Detail
-
NODE_MOVED
public static final int NODE_MOVED
The figure representing a node was moved.- See Also:
- Constant Field Values
-
EDGE_ROUTED
public static final int EDGE_ROUTED
The connector representing an edge was just routed.- See Also:
- Constant Field Values
-
NODE_DRAWN
public static final int NODE_DRAWN
The given node was just drawn.- See Also:
- Constant Field Values
-
EDGE_DRAWN
public static final int EDGE_DRAWN
The given edge was just drawn.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GraphViewEvent
public GraphViewEvent(java.lang.Object source, int id, java.lang.Object target)Construct a GraphViewEvent with the given source and target and a null previous value.
-
GraphViewEvent
public GraphViewEvent(java.lang.Object source, int id, java.lang.Object target, java.lang.Object oldValue)Construct a GraphViewEvent with the given source, target, and previous value.
-
-
Method Detail
-
getID
public int getID()
Return the type id for this event.
-
getTarget
public java.lang.Object getTarget()
Return the target value, which is event-specific.
-
getOldValue
public java.lang.Object getOldValue()
Return the old value, which is event-specific.
-
toString
public java.lang.String toString()
Return a string representation of this event.- Overrides:
toStringin classjava.util.EventObject
-
-