edu.umd.cs.jazz.event
Class ZNodeContainerEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--edu.umd.cs.jazz.event.ZNodeContainerEvent

public class ZNodeContainerEvent
extends java.awt.AWTEvent

A low-level event which indicates that a node has changed.

Node events are provided for notification purposes ONLY; Jazz will automatically handle changes to the containers contents internally so that the program works properly regardless of whether the program is receiving these events or not.

This low-level event is generated by a node object when a node transformed, made visible or invisible, and when another node is added to it or removed from it. The event is passed to every ZNodeContainerListener or ZNodeContainerAdapter object which registered to receive such events using the node's addContainerListener method. (ZNodeContainerAdapter objects implement the ZNodeContainerListener interface.) Each such listener object gets this ZNodeContainerEvent when the event occurs.

See Also:
ZNodeContainerAdapter, ZNodeContainerListener, Serialized Form

Field Summary
static int NODE_ADDED
          This event indicates that a node was added to the container.
static int NODE_CONTAINER_FIRST
          The first number in the range of ids used for container events.
static int NODE_CONTAINER_LAST
          The last number in the range of ids used for container events.
static int NODE_REMOVED
          This event indicates that a node was removed from the container.
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ZNodeContainerEvent(ZNode source, int id, ZNode child)
          Constructs a ZNodeContainerEvent object.
 
Method Summary
 ZNode getChild()
          Returns the ZNode that was affected by the event.
 ZNode getNode()
          Returns the originator of the event.
 
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, paramString, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_CONTAINER_FIRST

public static final int NODE_CONTAINER_FIRST
The first number in the range of ids used for container events.

NODE_CONTAINER_LAST

public static final int NODE_CONTAINER_LAST
The last number in the range of ids used for container events.

NODE_ADDED

public static final int NODE_ADDED
This event indicates that a node was added to the container.

NODE_REMOVED

public static final int NODE_REMOVED
This event indicates that a node was removed from the container.
Constructor Detail

ZNodeContainerEvent

public ZNodeContainerEvent(ZNode source,
                           int id,
                           ZNode child)
Constructs a ZNodeContainerEvent object.
Parameters:
source - the ZNode object (container) that originated the event
id - an integer indicating the type of event
child - the node that was added or removed
Method Detail

getNode

public ZNode getNode()
Returns the originator of the event.
Returns:
the ZNode object that originated the event

getChild

public ZNode getChild()
Returns the ZNode that was affected by the event.
Returns:
the ZNode object that was added or removed