The animation package

Package:

diva.canvas.animation

Status:

0.1. Very preliminary. Published to ptdesign. 05/05/98.

Last updated:

May 5th, 1998.

Imported packages and classes:

java.awt.shape.*
java.awt.geom.*
java.awt.event.ActionListener
java.awt.swing.Timer

See also:

The Diva canvas
Copyright

Contents

Overview

The canvas animation package provides support for animating figures on the canvas. The animation support is directed to moving and changing figures, not animation of images. This package is based on Michael Shilman's graph.animation package, but modified to use the Swing Timer class.

Note: this is completely wrong. Animators should drive the FigureListener and ValueListener interfaces.

Interfaces

interface Animation

An interface for objects that can be animated.

boolean reset ( )
Reset the animation.

boolean step ( )
Perform one step of the animation, returning true if the animation is done.

void setInterval ( long )
Tell the animation what it's recurrence interval is, in milliseconds. This method is intended for calling by the Animator class only.

Classes

class Animator

An object that runs animations. This object encapsulates one or more instances of the AWT Timer object to manage animation scheduling.

void run ( Animation, int )
Run an animation that executes at the given interval in milliseconds. The Animation will be removed from this Animator when the animation completes.

void run ( Animation, int, ActionListener )
Run an animation that executes at the given rate in milliseconds. The Animation will be removed from this Animator and the action listener notified when the animation completes.

class CombinedAnimation implements Animation

An animation that performs two animations at once.

CombinedAnimation ( Animation, Animation )
Construct the combined animation of two animations.

class PathAnimation implements Animation

An animation that moves a glyph along some specified path.

PathAnimation ( Figure, long, double, double )
Construct a linear animation of the given duration and have it move the given Figure.

PathAnimation ( DragListener, long, double, double )
Construct a linear animation of the given duration and have it generate events to the drag listener.

PathAnimation ( Figure, long, Shape )
Construct an animation of the given duration along the path of the given Shape.

PathAnimation ( DragListener, long, Shape )
Construct an animation of the given duration along the path of the given Shape.

class TransformAnimation implements Animation

An animation that incrementally applies a transform.

TransformAnimation ( Figure, long, AffineTransform )
Construct an animation of the given duration that incrementally applies the given transform to the given figure.

Issues

: