|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.EventObject | +--java.awt.AWTEvent | +--edu.umd.cs.jazz.event.ZCameraEvent
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.
Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.
ZCameraAdapter
,
ZCameraListener
, Serialized FormField 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)
Deprecated. as of Jazz 1.1, use createViewChangedEvent() instead. |
protected |
ZCameraEvent(ZCamera source,
int id,
java.awt.geom.AffineTransform viewTransform,
java.lang.Object dummy)
|
Method Summary | |
static ZCameraEvent |
createViewChangedEvent(ZCamera source,
java.awt.geom.AffineTransform viewTransform)
Factory method to create a ZCameraEvent with a CAMERA_VIEW_CHANGED ID. |
void |
dispatchTo(java.lang.Object listener)
Calls appropriate method on the listener based on this events ID. |
ZCamera |
getCamera()
Returns the originator of the event. |
java.lang.Class |
getListenerType()
Returns the ZCameraLister class. |
java.awt.geom.AffineTransform |
getOrigViewTransform()
For view change events, this returns the value of the view transform before the view transform was changed. |
boolean |
isConsumed()
Returns true if this event has previously been consumed. |
void |
setSource(java.lang.Object aSource)
Set the souce of this event. |
Methods inherited from class java.awt.AWTEvent |
consume, finalize, getID, 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 |
public static final int CAMERA_FIRST
public static final int CAMERA_LAST
public static final int CAMERA_VIEW_CHANGED
public java.awt.geom.AffineTransform viewTransform
Constructor Detail |
public ZCameraEvent(ZCamera source, int id, java.awt.geom.AffineTransform viewTransform)
source
- the ZCamera object that originated the eventid
- an integer indicating the type of eventviewTransform
- The original transform of the camera (for transform events)protected ZCameraEvent(ZCamera source, int id, java.awt.geom.AffineTransform viewTransform, java.lang.Object dummy)
Method Detail |
public static ZCameraEvent createViewChangedEvent(ZCamera source, java.awt.geom.AffineTransform viewTransform)
source
- the ZCamera object that originated the eventviewTransform
- The original transform of the camera (for transform events)public ZCamera getCamera()
public java.awt.geom.AffineTransform getOrigViewTransform()
public void dispatchTo(java.lang.Object listener)
dispatchTo
in interface ZEvent
public java.lang.Class getListenerType()
getListenerType
in interface ZEvent
public boolean isConsumed()
isConsumed
in interface ZEvent
isConsumed
in class java.awt.AWTEvent
public void setSource(java.lang.Object aSource)
setSource
in interface ZEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |