edu.umd.cs.jazz.event
Class ZNodeEvent

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

public class ZNodeEvent
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 is transformed, made visible or invisible. The event is passed to every ZNodeListener or ZNodeAdapter object which registered to receive such events using the node's addContainerListener method. (ZNodeAdapter objects implement the ZNodeListener interface.) Each such listener object gets this ZNodeEvent when the event occurs.

See Also:
ZNodeAdapter, ZNodeListener, Serialized Form

Field Summary
static int NODE_FIRST
          The first number in the range of ids used for container events.
static int NODE_HIDDEN
          This event indicates that the node was made invisible.
static int NODE_LAST
          The last number in the range of ids used for container events.
static int NODE_SHOWN
          This event indicates that the node was made visible.
static int NODE_TRANSFORMED
          This event indicates that the node's transform changed.
 java.awt.geom.AffineTransform transform
          The value of the transform before the transform was changed for transform events (or null for other event types).
 
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
ZNodeEvent(ZNode source, int id, java.awt.geom.AffineTransform transform)
          Constructs a ZNodeEvent object.
 
Method Summary
 ZNode getNode()
          Returns the originator of the event.
 java.awt.geom.AffineTransform getOrigTransform()
          For transform events, this returns the value of the transform before the transform was changed.
 
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_FIRST

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

NODE_LAST

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

NODE_TRANSFORMED

public static final int NODE_TRANSFORMED
This event indicates that the node's transform changed.

NODE_SHOWN

public static final int NODE_SHOWN
This event indicates that the node was made visible.

NODE_HIDDEN

public static final int NODE_HIDDEN
This event indicates that the node was made invisible.

transform

public java.awt.geom.AffineTransform transform
The value of the transform before the transform was changed for transform events (or null for other event types).
Constructor Detail

ZNodeEvent

public ZNodeEvent(ZNode source,
                  int id,
                  java.awt.geom.AffineTransform transform)
Constructs a ZNodeEvent object.
Parameters:
source - the ZNode object that originated the event
id - an integer indicating the type of event
transform - The original transform of the node (for transform events)
Method Detail

getNode

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

getOrigTransform

public java.awt.geom.AffineTransform getOrigTransform()
For transform events, this returns the value of the transform before the transform was changed.
Returns:
the the original transform value.