Jazz API Documentation

edu.umd.cs.jazz
Class ZCamera

java.lang.Object
  |
  +--edu.umd.cs.jazz.ZSceneGraphObject
        |
        +--edu.umd.cs.jazz.ZVisualComponent
              |
              +--edu.umd.cs.jazz.ZCamera
All Implemented Interfaces:
java.io.Serializable, ZAppearance, ZFillColor, ZSerializable

public class ZCamera
extends ZVisualComponent
implements ZFillColor, java.io.Serializable

ZCamera represents a viewport onto a list of nodes. A camera can look at any number of ZLayerGroups, and can specify where in space it looks as specified by an arbitrary affine transformation.

When a ZCanvas is created, it automatically creates a top-level camera attached to that canvas that is the same size as the canvas. Thus, the whole scenegraph is rendered within that canvas.

It is also possible to create an "internal camera" that acts as a portal, or internal window. That is, it is an object within the scene that looks onto the scene. To do this, create a scenegraph where the top-level camera sees both the regular layer, and a new layer that contains the internal camera. Then, make the new internal camera look at the regular layer. The following code demonstrates this:

	ZCamera portal = new ZCamera();
	portal.setBounds(100, 100, 200, 200);
	portal.setFillColor(Color.red);
	ZVisualLeaf leaf = new ZVisualLeaf(portal);
	leaf.setFindable(false);
	ZVisualGroup border = new ZVisualGroup(leaf);
	ZRectangle rect = new ZRectangle(100, 100, 200, 200);
	rect.setPenColor(Color.blue);
	rect.setFillColor(null);
	rect.setPenWidth(5.0f);
	border.setFrontVisualComponent(rect);
	ZLayerGroup layer = new ZLayerGroup(border);
	canvas.getRoot().addChild(layer);
	canvas.getCamera().addLayer(layer);
	portal.addLayer(canvas.getLayer());
 

See Also:
Serialized Form

Field Summary
static java.awt.Color fillColor_DEFAULT
           
protected  javax.swing.event.EventListenerList listenerList
          List of event listeners for camera events.
 
Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject
bounds, objRefTable, volatileBounds_DEFAULT
 
Constructor Summary
ZCamera()
          Constructs a new ZCamera.
ZCamera(ZLayerGroup layer, ZDrawingSurface aSurface)
          Constructs a new ZCamera.
 
Method Summary
 void addCameraListener(ZCameraListener l)
          Adds the specified camera listener to receive camera events from this camera
 void addLayer(ZLayerGroup layer)
          Add a portion of the scenegraph that what this camera sees.
 void animate(java.awt.geom.AffineTransform at, int millis, ZDrawingSurface surface)
          Set the transform of this camera to the specified transform, and animate the change from its current transformation over the specified number of milliseconds using a slow-in slow-out animation.
 float cameraToLocal(java.awt.geom.Point2D pt, ZNode node)
          Transform a point in the camera's coordinate system through the camera down the tree to the specified node's local coordinate system.
 float cameraToLocal(java.awt.geom.Rectangle2D rect, ZNode node)
          Transform a rectangle in the camera's coordinate system through the camera down the tree to the specified node's local coordinate system.
 void center(java.awt.geom.Rectangle2D refBounds, int millis, ZDrawingSurface aSurface)
          Animates the camera view so that the specified bounds (in global coordinates) is centered within the view of the camera.
 java.lang.Object clone()
          Duplicates the current object by using the copy constructor.
protected  void computeInverseViewTransform()
          Internal method to compute the inverse camera transform based on the camera transform.
 java.lang.String dump()
          Generate a string that represents this object for debugging.
 void duplicateObject(ZCamera refCamera)
          Copies all object information from the reference object into the current object.
 java.util.ArrayList findNodes(ZFindFilter filter)
          Return the list of nodes that are accepted by the specified filter in the portion of the scenegraph visible through this camera.
protected  void fireCameraEvent(int id, java.awt.geom.AffineTransform origViewTransform)
          Notifies all listeners that have registered interest for notification on this event type.
 ZDrawingSurface getDrawingSurface()
          Get the value of surface.
 java.awt.Color getFillColor()
          Get the value of fillColor.
 java.awt.geom.AffineTransform getInverseViewTransform()
          Returns a copy of the inverse view transform associated with this camera.
 ZLayerGroup[] getLayers()
          Returns a copy of the list of layers that this camera looks onto.
 float getMagnification()
          Returns the current magnification of this camera.
 int getNumLayers()
          Returns the number of layers of this camera.
 ZRoot getRoot()
          Returns the root of the scene graph that this camera is looking at
 float getScale()
          Returns the current scale of this transform.
 float getTranslateX()
          Returns the current X translation of this object
 float getTranslateY()
          Returns the current Y translation of this object
 java.awt.geom.Point2D getTranslation()
          Returns the current translation of this object
 ZBounds getViewBounds()
          Returns the bounds that this Camera sees in global scene coordinates.
 java.awt.geom.AffineTransform getViewTransform()
          Returns a copy of the view transform that specifes where in space this camera looks.
 float localToCamera(java.awt.geom.Point2D pt, ZNode node)
          Transform a point in a node's local coordinate system up the scenegraph backwards through the camera to the camera's coordinate system.
 float localToCamera(java.awt.geom.Rectangle2D rect, ZNode node)
          Transform a rectangle in a node's local coordinate system up the scenegraph backwards through the camera to the camera's coordinate system.
 boolean pick(java.awt.geom.Rectangle2D rect, ZSceneGraphPath path)
          Picks the first object under the specified rectangle (if there is one) as searched in reverse (front-to-back) order.
 void removeCameraListener(ZCameraListener l)
          Removes the specified camera listener so that it no longer receives camera events from this camera.
 void removeLayer(ZLayerGroup layer)
          Removes a portion of the scenegrpah from what this camera sees
 void render(ZRenderContext renderContext)
          Renders the view this camera sees.
 void repaint()
          Repaint causes the portions of the surfaces that this object appears in to be marked as needing painting, and queues events to cause those areas to be painted.
 void repaint(ZBounds repaintBounds)
          This is an internal form of repaint that is only intended to be used by calls from within Jazz.
 void replaceLayer(ZLayerGroup original, ZLayerGroup replacement)
          Replaces the specified node out of the list of layers of this camera, and replaces it with the specified node.
 void scale(float dz)
          Scale the object from its current scale to the scale specified by muliplying the current scale and dz.
 void scale(float dz, float x, float y)
          Scale the object around the specified point (x, y) from its current scale to the scale specified by muliplying the current scale and dz.
 void scale(float dz, float x, float y, int millis, ZDrawingSurface surface)
          Animate the object around the specified point (x, y) from its current scale to the scale specified by muliplying the current scale and dz
 void scale(float dz, int millis, ZDrawingSurface surface)
          Animate the object from its current scale to the scale specified by muliplying the current scale and deltaZ
 void setBounds(int x, int y, int w, int h)
          Sets the bounds of this camera.
 void setBounds(java.awt.geom.Rectangle2D newBounds)
          Sets the bounds of this camera.
 void setDrawingSurface(ZDrawingSurface aSurface)
          Set the value of surface.
 void setFillColor(java.awt.Color aColor)
          Set the value of fillColor.
 void setScale(float finalz)
          Sets the scale of the view transform
 void setScale(float finalz, float x, float y)
          Set the scale of the object to the specified target scale, scaling the object around the specified point (x, y).
 void setScale(float finalz, float x, float y, int millis, ZDrawingSurface surface)
          Animate the object around the specified point (x, y) to the specified target scale.
 void setScale(float finalz, int millis, ZDrawingSurface surface)
          Animate the object from its current scale to the specified target scale.
 void setState(java.lang.String fieldType, java.lang.String fieldName, java.lang.Object fieldValue)
          Set some state of this object as it gets read back in.
 void setTranslate(float x, float y)
          Translate the object to the specified position
 void setTranslate(float x, float y, int millis, ZDrawingSurface surface)
          Animate the object from its current position to the position specified by x, y
 void setTranslateX(float x)
          Sets the current X translation of this object
 void setTranslateY(float y)
          Sets the current Y translation of this object
 void setViewTransform(java.awt.geom.AffineTransform transform)
          Sets the view transform associated with this camera.
 void setViewTransform(double m00, double m10, double m01, double m11, double m02, double m12)
          Sets the view transform associated with this camera.
 void translate(float dx, float dy)
          Translate the object by the specified deltaX and deltaY
 void translate(float dx, float dy, int millis, ZDrawingSurface surface)
          Animate the object from its current position by the specified deltaX and deltaY
 void trimToSize()
          Trims the capacity of the array that stores the layers list points to the actual number of points.
 void writeObject(ZObjectOutputStream out)
          Write out all of this object's state.
 void writeObjectRecurse(ZObjectOutputStream out)
          Specify which objects this object references in order to write out the scenegraph properly
 
Methods inherited from class edu.umd.cs.jazz.ZVisualComponent
boundsUpdated, duplicateObject, getParents, paint, pickBounds, updateBounds, updateVolatility
 
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject
computeBounds, duplicateObject, getBounds, getVolatileBounds, reshape, setVolatileBounds, updateObjectReferences
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fillColor_DEFAULT

public static final java.awt.Color fillColor_DEFAULT

listenerList

protected transient javax.swing.event.EventListenerList listenerList
List of event listeners for camera events.
Constructor Detail

ZCamera

public ZCamera()
Constructs a new ZCamera. Cameras are always associated with a scenegraph, but are not attached to any output device (such as a window or a portal) to start.

ZCamera

public ZCamera(ZLayerGroup layer,
               ZDrawingSurface aSurface)
Constructs a new ZCamera. Cameras are always associated with a scenegraph, but are not attached to any output device (such as a window or a portal) to start.
Parameters:
node - The part of the scenegraph this camera sees.
surf - The surface this top-level camera projects onto
Method Detail

duplicateObject

public void duplicateObject(ZCamera refCamera)
Copies all object information from the reference object into the current object. This method is called from the clone method. All ZSceneGraphObjects objects contained by the object being duplicated are duplicated, except parents which are set to null. This results in the sub-tree rooted at this object being duplicated.
Parameters:
refCamera - The reference camera to copy

clone

public java.lang.Object clone()
Duplicates the current object by using the copy constructor. The portion of the reference object that is duplicated is that necessary to reuse the object in a new place within the scenegraph, but the new object is not inserted into any scenegraph. The object must be attached to a live scenegraph (a scenegraph that is currently visible) or be registered with a camera directly in order for it to be visible.

In particular, the camera's layers are duplicated so that a copied camera will continue to see the same part of the scenegraph. However, if the reference camera was attached to a surface, the copied camera will not be attached to that surface, and must be made visible by attaching to a new surface (or by being visible through another camera.)

However, the event listeners for the duplicated camera are reused references to the original camera's event listeners.

Overrides:
clone in class ZVisualComponent
Returns:
A copy of this camera.
See Also:
ZSceneGraphObject.updateObjectReferences(edu.umd.cs.jazz.util.ZObjectReferenceTable)

trimToSize

public void trimToSize()
Trims the capacity of the array that stores the layers list points to the actual number of points. Normally, the layers list arrays can be slightly larger than the number of points in the layers list. An application can use this operation to minimize the storage of a layers list.
Overrides:
trimToSize in class ZVisualComponent

addLayer

public void addLayer(ZLayerGroup layer)
Add a portion of the scenegraph that what this camera sees. If the layer is already visible by this camera, then nothing happens.
Parameters:
layer - The part of the scenegraph added to what this camera sees.

removeLayer

public void removeLayer(ZLayerGroup layer)
Removes a portion of the scenegrpah from what this camera sees
Parameters:
layer - The part of the scenegraph removed from what this camera sees.

replaceLayer

public void replaceLayer(ZLayerGroup original,
                         ZLayerGroup replacement)
Replaces the specified node out of the list of layers of this camera, and replaces it with the specified node. The replacement node will be added to layer list in the same position as the original was.
Parameters:
original - is the old node that is being swapped out as a layer
replacement - is the new node that is being swapped in as a layer

getLayers

public ZLayerGroup[] getLayers()
Returns a copy of the list of layers that this camera looks onto.
Returns:
Portion of scenegraph that is visible from this camera.

getNumLayers

public int getNumLayers()
Returns the number of layers of this camera.
Returns:
the number of layers.

getDrawingSurface

public ZDrawingSurface getDrawingSurface()
Get the value of surface.
Returns:
Value of surface.

setDrawingSurface

public void setDrawingSurface(ZDrawingSurface aSurface)
Set the value of surface.
Parameters:
v - Value to assign to surface.

getFillColor

public java.awt.Color getFillColor()
Get the value of fillColor.
Specified by:
getFillColor in interface ZFillColor
Returns:
Value of fillColor.

setFillColor

public void setFillColor(java.awt.Color aColor)
Set the value of fillColor.
Specified by:
setFillColor in interface ZFillColor
Parameters:
v - Value to assign to fillColor.

getViewBounds

public ZBounds getViewBounds()
Returns the bounds that this Camera sees in global scene coordinates.
Returns:
The bounds.

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Sets the bounds of this camera.
Parameters:
x,y,w,h - The new bounds of this camera

setBounds

public void setBounds(java.awt.geom.Rectangle2D newBounds)
Sets the bounds of this camera.
Parameters:
newBounds - The new bounds of this camera

getMagnification

public float getMagnification()
Returns the current magnification of this camera.
Returns:
The magnification factor.

repaint

public void repaint()
Description copied from class: ZSceneGraphObject
Repaint causes the portions of the surfaces that this object appears in to be marked as needing painting, and queues events to cause those areas to be painted. The painting does not actually occur until those events are handled. If this object is visible in multiple places because more than one camera can see this object, then all of those places are marked as needing painting.

Scenegraph objects should call repaint when their internal state has changed and they need to be redrawn on the screen.

Important note : Scenegraph objects should call reshape() instead of repaint() if the internal state change effects the bounds of the shape in any way (e.g. changing penwidth, selection, transform, adding points to a line, etc.)

Overrides:
repaint in class ZVisualComponent
Tags copied from class: ZSceneGraphObject
See Also:
ZSceneGraphObject.reshape()

repaint

public void repaint(ZBounds repaintBounds)
This is an internal form of repaint that is only intended to be used by calls from within Jazz. It passes repaint requests up through the camera to other interested camera, and the surface (if there is one). Note that the input parameter may be modified as a result of this call.
Overrides:
repaint in class ZVisualComponent
Parameters:
repaintBounds - The bounds that need to be repainted (in global coordinates)

render

public void render(ZRenderContext renderContext)
Renders the view this camera sees.

The transform, clip, and composite will be set appropriately when this object is rendered. It is up to this object to restore the transform, clip, and composite of the Graphics2D if this node changes any of them. However, the color, font, and stroke are unspecified by Jazz. This object should set those things if they are used, but they do not need to be restored.

Overrides:
render in class ZVisualComponent
Parameters:
renderContext - The graphics context to use for rendering.

getRoot

public ZRoot getRoot()
Returns the root of the scene graph that this camera is looking at

pick

public boolean pick(java.awt.geom.Rectangle2D rect,
                    ZSceneGraphPath path)
Picks the first object under the specified rectangle (if there is one) as searched in reverse (front-to-back) order. The picked object is returned via the ZSceneGraphPath. Only nodes with "pickable" visual components are returned.
Overrides:
pick in class ZVisualComponent
Parameters:
rect - Coordinates of pick rectangle in camera coordinates.
Returns:
true if pick succeeds.
See Also:
ZDrawingSurface.pick(int, int)

findNodes

public java.util.ArrayList findNodes(ZFindFilter filter)
Return the list of nodes that are accepted by the specified filter in the portion of the scenegraph visible through this camera. If a node is not "findable", then neither that node, nor any of its descendants will be included. The filter specifies whether or not a given node should be accepted by this search, and whether the children of a node should be searched.
Parameters:
filter - The filter that decides whether or not to include individual nodes in the find list
Returns:
The nodes found
See Also:
ZNode.isFindable(), ZFindFilter

dump

public java.lang.String dump()
Generate a string that represents this object for debugging.
Overrides:
dump in class ZSceneGraphObject
Returns:
the string that represents this object for debugging
See Also:
ZDebug.dump(edu.umd.cs.jazz.ZNode)

addCameraListener

public void addCameraListener(ZCameraListener l)
Adds the specified camera listener to receive camera events from this camera
Parameters:
l - the camera listener

removeCameraListener

public void removeCameraListener(ZCameraListener l)
Removes the specified camera listener so that it no longer receives camera events from this camera.
Parameters:
l - the camera listener

fireCameraEvent

protected void fireCameraEvent(int id,
                               java.awt.geom.AffineTransform origViewTransform)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method. The listener list is processed in last to first order.
Parameters:
id - The event id (CAMERA_VIEW_CHANGED)
origViewTransform - The original view transform (for view change events)
See Also:
EventListenerList

getViewTransform

public java.awt.geom.AffineTransform getViewTransform()
Returns a copy of the view transform that specifes where in space this camera looks.
Returns:
The current camera view transform.

computeInverseViewTransform

protected void computeInverseViewTransform()
Internal method to compute the inverse camera transform based on the camera transform. This gets called from within ZCamera whenever the inverse camera transform cache has been invalidated, and it is needed.

getInverseViewTransform

public java.awt.geom.AffineTransform getInverseViewTransform()
Returns a copy of the inverse view transform associated with this camera.
Returns:
The current inverse camera transform.

setViewTransform

public void setViewTransform(java.awt.geom.AffineTransform transform)
Sets the view transform associated with this camera. This controls where in space this camera looks.
Parameters:
transform -  

setViewTransform

public void setViewTransform(double m00,
                             double m10,
                             double m01,
                             double m11,
                             double m02,
                             double m12)
Sets the view transform associated with this camera. This controls where in space this camera looks.
Parameters:
m00, m01, m02, m10, m11, m12 - the 6 floating point values that compose the 3x3 transformation matrix

cameraToLocal

public float cameraToLocal(java.awt.geom.Point2D pt,
                           ZNode node)
Transform a point in the camera's coordinate system through the camera down the tree to the specified node's local coordinate system. In the typical case where this is a top-level camera, and the point is in screen coordinates, this will transform the point to the local coordinate system of the specified node. The input point is modified by this method. It also returns the change in scale from the camera coordinate system to the node coordinate system.

If the node is specified as null, then the point is transformed through the camera, but no further - thus transforming the point from window to global coordinates.

If the specified node is not on the portion of the scenegraph that is visible through the camera, then a ZNodeNotFoundException is thrown.

Parameters:
pt - The point to be transformed
node - The node to transform to
Returns:
dz The change in scale from the camera coordinate system to the node coordinate system.
Throws:
ZNodeNotFoundException - if the node is not in the subtree of the scenegraph under one of the camera's layers.
See Also:
localToCamera(Point2D, ZNode)

cameraToLocal

public float cameraToLocal(java.awt.geom.Rectangle2D rect,
                           ZNode node)
Transform a rectangle in the camera's coordinate system through the camera down the tree to the specified node's local coordinate system. In the typical case where this is a top-level camera, and the rectangle is in screen coordinates, this will transform the rectangle to the local coordinate system of the specified node. The input rectangle is modified by this method. It also returns the change in scale from the camera coordinate system to the node coordinate system.

If the node is specified as null, then the rectangle is transformed through the camera, but no further - thus transforming the rectangle from window to global coordinates.

If the specified node is not on the portion of the scenegraph that is visible through the camera, then a ZNodeNotFoundException is thrown.

Parameters:
rect - The rectangle to be transformed
node - The node to transform to
Returns:
dz The change in scale from the camera coordinate system to the node coordinate system.
Throws:
ZNodeNotFoundException - if the node is not in the subtree of the scenegraph under one of the camera's layers.
See Also:
localToCamera(Rectangle2D, ZNode)

localToCamera

public float localToCamera(java.awt.geom.Point2D pt,
                           ZNode node)
Transform a point in a node's local coordinate system up the scenegraph backwards through the camera to the camera's coordinate system. In the typical case where this is a top-level camera, and the point represents a coordinate in the local coordinate system of a node, this will transform the point to screen coordinates. The input point is modified by this method. It also returns the change in scale from the node coordinate system to the camera coordinate system.

If the node is specified as null, then the point is transformed from global coordinates through the camera, thus transforming the point from global to window coordinates.

If the specified node is not on the portion of the scenegraph that is visible through the camera, then a ZNodeNotFoundException is thrown.

Parameters:
pt - The point to be transformed
node - The node that represents the local coordinates to transform from
Returns:
dz The change in scale from the node coordinate system to the camera coordinate system.
Throws:
ZNodeNotFoundException - if the node is not in the subtree of the scenegraph under one of the camera's layers.
See Also:
cameraToLocal(Point2D, ZNode)

localToCamera

public float localToCamera(java.awt.geom.Rectangle2D rect,
                           ZNode node)
Transform a rectangle in a node's local coordinate system up the scenegraph backwards through the camera to the camera's coordinate system. In the typical case where this is a top-level camera, and the rectangle is in the local coordinate system of a node, this will transform the rectangle to screen coordinates. The input rectangle is modified by this method. It also returns the change in scale from the node coordinate system to the camera coordinate system.

If the node is specified as null, then the rectangle is transformed from global coordinates through the camera, thus transforming the rectangle from global to window coordinates.

If the specified node is not on the portion of the scenegraph that is visible through the camera, then a ZNodeNotFoundException is thrown.

Parameters:
rect - The rectangle to be transformed
node - The node that represents the local coordinates to transform from
Returns:
dz The change in scale from the node coordinate system to the camera coordinate system.
Throws:
ZNodeNotFoundException - if the node is not in the subtree of the scenegraph under one of the camera's layers.
See Also:
cameraToLocal(Rectangle2D, ZNode)

center

public void center(java.awt.geom.Rectangle2D refBounds,
                   int millis,
                   ZDrawingSurface aSurface)
Animates the camera view so that the specified bounds (in global coordinates) is centered within the view of the camera.
Parameters:
refBounds - The bounds (in global coordinates) to be centered.
millis - The time in milliseconds to perform the animation
surface - The surface to be updated during the animation

getTranslation

public java.awt.geom.Point2D getTranslation()
Returns the current translation of this object
Returns:
the translation

getTranslateX

public float getTranslateX()
Returns the current X translation of this object
Returns:
the translation

setTranslateX

public void setTranslateX(float x)
Sets the current X translation of this object

getTranslateY

public float getTranslateY()
Returns the current Y translation of this object
Returns:
the translation

setTranslateY

public void setTranslateY(float y)
Sets the current Y translation of this object

translate

public void translate(float dx,
                      float dy)
Translate the object by the specified deltaX and deltaY
Parameters:
dx - X-coord of translation
dy - Y-coord of translation

translate

public void translate(float dx,
                      float dy,
                      int millis,
                      ZDrawingSurface surface)
Animate the object from its current position by the specified deltaX and deltaY
Parameters:
dx - X-coord of translation
dy - Y-coord of translation
millis - Number of milliseconds over which to perform the animation
surface - The surface to updated during animation.

setTranslate

public void setTranslate(float x,
                         float y)
Translate the object to the specified position
Parameters:
x - X-coord of translation
y - Y-coord of translation

setTranslate

public void setTranslate(float x,
                         float y,
                         int millis,
                         ZDrawingSurface surface)
Animate the object from its current position to the position specified by x, y
Parameters:
x - X-coord of translation
y - Y-coord of translation
millis - Number of milliseconds over which to perform the animation
surface - The surface to updated during animation.

getScale

public float getScale()
Returns the current scale of this transform. Note that this is implemented by applying the transform to a diagonal line and returning the length of the resulting line. If the transform is sheared, or has a non-uniform scaling in X and Y, the results of this method will be ill-defined.
Returns:
the scale

scale

public void scale(float dz)
Scale the object from its current scale to the scale specified by muliplying the current scale and dz.
Parameters:
dz - scale factor

scale

public void scale(float dz,
                  float x,
                  float y)
Scale the object around the specified point (x, y) from its current scale to the scale specified by muliplying the current scale and dz.
Parameters:
dz - scale factor
x - X coordinate of the point to scale around
y - Y coordinate of the point to scale around

scale

public void scale(float dz,
                  int millis,
                  ZDrawingSurface surface)
Animate the object from its current scale to the scale specified by muliplying the current scale and deltaZ
Parameters:
dz - scale factor
millis - Number of milliseconds over which to perform the animation
surface - The surface to updated during animation.

scale

public void scale(float dz,
                  float x,
                  float y,
                  int millis,
                  ZDrawingSurface surface)
Animate the object around the specified point (x, y) from its current scale to the scale specified by muliplying the current scale and dz
Parameters:
dz - scale factor
x - X coordinate of the point to scale around
y - Y coordinate of the point to scale around
millis - Number of milliseconds over which to perform the animation
surface - The surface to updated during animation.

setScale

public void setScale(float finalz)
Sets the scale of the view transform
Parameters:
the - new scale

setScale

public void setScale(float finalz,
                     float x,
                     float y)
Set the scale of the object to the specified target scale, scaling the object around the specified point (x, y).
Parameters:
finalz - scale factor
x - X coordinate of the point to scale around
y - Y coordinate of the point to scale around

setScale

public void setScale(float finalz,
                     int millis,
                     ZDrawingSurface surface)
Animate the object from its current scale to the specified target scale.
Parameters:
finalz - scale factor
millis - Number of milliseconds over which to perform the animation
surface - The surface to updated during animation.

setScale

public void setScale(float finalz,
                     float x,
                     float y,
                     int millis,
                     ZDrawingSurface surface)
Animate the object around the specified point (x, y) to the specified target scale.
Parameters:
finalz - scale factor
x - X coordinate of the point to scale around
y - Y coordinate of the point to scale around
millis - Number of milliseconds over which to perform the animation
surface - The surface to updated during animation.

animate

public void animate(java.awt.geom.AffineTransform at,
                    int millis,
                    ZDrawingSurface surface)
Set the transform of this camera to the specified transform, and animate the change from its current transformation over the specified number of milliseconds using a slow-in slow-out animation. The surface specifies which surface should be updated during the animation.

If millis is 0, then the transform is updated once, and the scene is not repainted immediately, but rather a repaint request is queued, and will be processed by an event handler.

Parameters:
at - Final transformation
millis - Number of milliseconds over which to perform the animation
surface - The surface to updated during animation.

writeObject

public void writeObject(ZObjectOutputStream out)
                 throws java.io.IOException
Write out all of this object's state.
Overrides:
writeObject in class ZVisualComponent
Parameters:
out - The stream that this object writes into

writeObjectRecurse

public void writeObjectRecurse(ZObjectOutputStream out)
                        throws java.io.IOException
Specify which objects this object references in order to write out the scenegraph properly
Overrides:
writeObjectRecurse in class ZVisualComponent
Parameters:
out - The stream that this object writes into

setState

public void setState(java.lang.String fieldType,
                     java.lang.String fieldName,
                     java.lang.Object fieldValue)
Set some state of this object as it gets read back in. After the object is created with its default no-arg constructor, this method will be called on the object once for each bit of state that was written out through calls to ZObjectOutputStream.writeState() within the writeObject method.
Overrides:
setState in class ZVisualComponent
Parameters:
fieldType - The fully qualified type of the field
fieldName - The name of the field
fieldValue - The value of the field

Jazz API Documentation