diva.graphx.event
Class GraphViewEvent

java.lang.Object
  extended by java.util.EventObject
      extended by diva.graphx.event.GraphViewEvent
All Implemented Interfaces:
Serializable

public class GraphViewEvent
extends EventObject

A 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:
$Revision: 1.2 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu), Steve Neuendorffer (neuendor@eecs.berkeley.edu)
See Also:
GraphController, Serialized Form

Field Summary
static int EDGE_DRAWN
          The given edge was just drawn, redrawn, or removed.
static int EDGE_ROUTED
          The connector representing an edge was just routed.
static int NODE_DRAWN
          The given node was just drawn, redrawn, or removed.
static int NODE_MOVED
          The figure representing a node was moved.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphViewEvent(Object source, int id, Object target)
          Construct a GraphViewEvent with the given source and target and a null previous value.
GraphViewEvent(Object source, int id, Object target, Object oldValue)
          Construct a GraphViewEvent 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

NODE_MOVED

public static final int NODE_MOVED
The figure representing a node was moved. The target parameter will be set to the moved figure.

See Also:
Constant Field Values

EDGE_ROUTED

public static final int EDGE_ROUTED
The connector representing an edge was just routed. The target parameter will be set to the rerouted edge.

See Also:
Constant Field Values

NODE_DRAWN

public static final int NODE_DRAWN
The given node was just drawn, redrawn, or removed. The target and oldValue parameters will be set to the drawn figure and null; the redrawn figure and the redrawn figure; or null and the removed figure respectively.

See Also:
Constant Field Values

EDGE_DRAWN

public static final int EDGE_DRAWN
The given edge was just drawn, redrawn, or removed. The target and oldValue parameters will be set to the drawn figure and null; the redrawn figure and the redrawn figure; or null and the removed figure respectively.

See Also:
Constant Field Values
Constructor Detail

GraphViewEvent

public GraphViewEvent(Object source,
                      int id,
                      Object target)
Construct a GraphViewEvent with the given source and target and a null previous value.


GraphViewEvent

public GraphViewEvent(Object source,
                      int id,
                      Object target,
                      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 Object getTarget()
Return the target value, which is event-specific.


getOldValue

public Object getOldValue()
Return the old value, which is event-specific.


toString

public String toString()
Return a string representation of this event.

Overrides:
toString in class EventObject


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.