edu.umd.cs.jazz.event
Class ZCameraEvent
java.lang.Object
|
+--java.util.EventObject
|
+--java.awt.AWTEvent
|
+--edu.umd.cs.jazz.event.ZCameraEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class ZCameraEvent
- extends java.awt.AWTEvent
ZCameraEvent is an event which indicates that a camera has changed.
Camera events are provided for notification purposes ONLY;
Jazz will automatically handle changes to the camera
contents internally so that the program works properly regardless of
whether the program is receiving these events or not.
This event is generated by a ZCamera visual component
when a camera's view is changed.
The event is passed to every ZCameraListener
or ZCameraAdapter object which registered to receive such
events using the camera's addCameraListener method.
(ZCameraAdapter objects implement the
ZCameraListener interface.) Each such listener object
gets this ZCameraEvent when the event occurs.
- See Also:
ZCameraAdapter,
ZCameraListener, Serialized Form
|
Field Summary |
static int |
CAMERA_FIRST
The first number in the range of ids used for camera events. |
static int |
CAMERA_LAST
The last number in the range of ids used for camera events. |
static int |
CAMERA_VIEW_CHANGED
This event indicates that the camera's view transform changed. |
java.awt.geom.AffineTransform |
viewTransform
The value of the view transform before the view transform was changed
for view 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,
HIERARCHY_BOUNDS_EVENT_MASK,
HIERARCHY_EVENT_MASK,
id,
INPUT_METHOD_EVENT_MASK,
INVOCATION_EVENT_MASK,
ITEM_EVENT_MASK,
KEY_EVENT_MASK,
MOUSE_EVENT_MASK,
MOUSE_MOTION_EVENT_MASK,
PAINT_EVENT_MASK,
RESERVED_ID_MAX,
TEXT_EVENT_MASK,
WINDOW_EVENT_MASK |
| Fields inherited from class java.util.EventObject |
source |
|
Constructor Summary |
ZCameraEvent(ZCamera source,
int id,
java.awt.geom.AffineTransform viewTransform)
Constructs a ZCameraEvent object. |
|
Method Summary |
ZCamera |
getCamera()
Returns the originator of the event. |
java.awt.geom.AffineTransform |
getOrigViewTransform()
For view change events, this returns the value of the view transform
before the view 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 |
CAMERA_FIRST
public static final int CAMERA_FIRST
- The first number in the range of ids used for camera events.
CAMERA_LAST
public static final int CAMERA_LAST
- The last number in the range of ids used for camera events.
CAMERA_VIEW_CHANGED
public static final int CAMERA_VIEW_CHANGED
- This event indicates that the camera's view transform changed.
viewTransform
public java.awt.geom.AffineTransform viewTransform
- The value of the view transform before the view transform was changed
for view transform events (or null for other event types).
ZCameraEvent
public ZCameraEvent(ZCamera source,
int id,
java.awt.geom.AffineTransform viewTransform)
- Constructs a ZCameraEvent object.
- Parameters:
source - the ZCamera object that originated the eventid - an integer indicating the type of eventviewTransform - The original transform of the camera (for transform events)
getCamera
public ZCamera getCamera()
- Returns the originator of the event.
- Returns:
- the ZCamera object that originated the event
getOrigViewTransform
public java.awt.geom.AffineTransform getOrigViewTransform()
- For view change events, this returns the value of the view transform
before the view transform was changed.
- Returns:
- the original view transform value.