y.view.hierarchy
Class HierarchyEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--y.view.hierarchy.HierarchyEvent
All Implemented Interfaces:
Serializable

public class HierarchyEvent
extends EventObject

Encapsulates information describing changes to a graph hierarchy and used to notify hierarchy listeners of the change.

See Also:
Serialized Form

Field Summary
static byte BEGIN_BLOCK
          Event type specifier which indicates that a block of consecutive events starts.
static byte EDGE_STATE_CHANGED
          Event type specifier which indicates that the inter edge state of an edge has changed.
static byte END_BLOCK
          Event type specifier which indicates that a block of consecutive events has ended.
static byte NODE_ADDED
          Event type specifier which indicates that a node has been added to the graph hierarchy.
static byte NODE_CHANGED
          Event type specifier which indicates that a property change on a node within the graph hierarchy has occured.
static byte NODE_REMOVED
          Event type specifier which indicates that a node has been removed from the graph hierarchy.
static byte NODE_STATE_CHANGED
          Event type specifier which indicates that the folder state of a node has changed.
static byte NODES_GROUPED
          Event type specifier which indicates that nodes within the hierarchy have been regrouped within the same graph.
static byte NODES_MOVED
          Event type specifier which indicates that nodes within the hierarchy have been moved to another graph.
static byte PRE_EDGE_STATE_CHANGE
          Event type specifier which indicates that the inter edge state of an edge is about to change.
static byte PRE_NODE_STATE_CHANGE
          Event type specifier which indicates that the folder state of a node is about to change.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
HierarchyEvent(HierarchyManager source, byte type, Graph graph, Object data)
          Creates a new instance of HierarchyEvent.
HierarchyEvent(HierarchyManager source, byte type, Object context, Object data)
          Creates a new instance of HierarchyEvent.
 
Method Summary
 Object getContext()
          the hierarchy level on which a change occured
 Object getData()
          data associated with a specific event type
 Graph getGraph()
          the hierarchy level on which a change occured
 HierarchyManager getHierarchy()
          Returns the hierarchy manager that is the source of this event.
 byte getType()
          Returns the type specifier of this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_ADDED

public static final byte NODE_ADDED
Event type specifier which indicates that a node has been added to the graph hierarchy. The associated event data will be the node that has been added.

See Also:
Constant Field Values

NODE_REMOVED

public static final byte NODE_REMOVED
Event type specifier which indicates that a node has been removed from the graph hierarchy. The associated event data will be the node that has been removed.

See Also:
Constant Field Values

NODE_CHANGED

public static final byte NODE_CHANGED
Event type specifier which indicates that a property change on a node within the graph hierarchy has occured. The associated event data will be the node whose property has changed.

See Also:
Constant Field Values

NODES_MOVED

public static final byte NODES_MOVED
Event type specifier which indicates that nodes within the hierarchy have been moved to another graph. The associated event data will be of type NodeList. The nodelist will contain the nodes which have been moved. The graph associated with the event will be the source graph from where the nodes have been moved.

See Also:
Constant Field Values

NODE_STATE_CHANGED

public static final byte NODE_STATE_CHANGED
Event type specifier which indicates that the folder state of a node has changed. The associated event data will be the node whose folder state has changed.

See Also:
Constant Field Values

EDGE_STATE_CHANGED

public static final byte EDGE_STATE_CHANGED
Event type specifier which indicates that the inter edge state of an edge has changed. The associated event data will be the edge whose inter edge state has changed.

See Also:
Constant Field Values

PRE_NODE_STATE_CHANGE

public static final byte PRE_NODE_STATE_CHANGE
Event type specifier which indicates that the folder state of a node is about to change. The associated event data will be the node whose folder state has changed.

See Also:
Constant Field Values

PRE_EDGE_STATE_CHANGE

public static final byte PRE_EDGE_STATE_CHANGE
Event type specifier which indicates that the inter edge state of an edge is about to change. The associated event data will be the edge whose inter edge state has changed.

See Also:
Constant Field Values

NODES_GROUPED

public static final byte NODES_GROUPED
Event type specifier which indicates that nodes within the hierarchy have been regrouped within the same graph. of type NodeList. The nodelist will contain the nodes which have been regrouped. The graph associated with the event will be the source graph from where the nodes have been moved.

See Also:
Constant Field Values

BEGIN_BLOCK

public static final byte BEGIN_BLOCK
Event type specifier which indicates that a block of consecutive events starts. There is no other consecutive event data These events may be nested!

See Also:
Constant Field Values

END_BLOCK

public static final byte END_BLOCK
Event type specifier which indicates that a block of consecutive events has ended. There is no other consecutive event data These events may be nested!

See Also:
Constant Field Values
Constructor Detail

HierarchyEvent

public HierarchyEvent(HierarchyManager source,
                      byte type,
                      Graph graph,
                      Object data)
Creates a new instance of HierarchyEvent.

Parameters:
source - the emitter of this event
type - one of the event type specifiers defined in this class
graph - the hierarchy level on which a change occured
data - data associated with a specific event type

HierarchyEvent

public HierarchyEvent(HierarchyManager source,
                      byte type,
                      Object context,
                      Object data)
Creates a new instance of HierarchyEvent.

Parameters:
source - the emitter of this event
type - one of the event type specifiers defined in this class
context - the hierarchy level on which a change occured
data - data associated with a specific event type
Method Detail

getHierarchy

public HierarchyManager getHierarchy()
Returns the hierarchy manager that is the source of this event.


getType

public byte getType()
Returns the type specifier of this event.

Returns:
one of the type specifiers defined in this class.

getGraph

public Graph getGraph()
the hierarchy level on which a change occured


getContext

public Object getContext()
the hierarchy level on which a change occured


getData

public Object getData()
data associated with a specific event type


© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003