edu.cmu.hcii.calo.test.manual.AnimationDemo Class Reference

Inherits edu.cmu.hcii.calo.view.animation.AnimationListener.

Inheritance diagram for edu.cmu.hcii.calo.test.manual.AnimationDemo:

Inheritance graph
[legend]
Collaboration diagram for edu.cmu.hcii.calo.test.manual.AnimationDemo:

Collaboration graph
[legend]
List of all members.

Detailed Description

A manual test demo for the Animation component.

Causes a panel to change size and color when a button is clicked.

Author:
Brian Ellis


Public Member Functions

 AnimationDemo ()
 Constructs an AnimationDemo frame and shows it onscreen.
void actionPerformed (ActionEvent e)
 Called when the animate button is clicked.
void animationDidUpdate (Animation a)
 Called when one of our animations updates.

Static Public Member Functions

static void main (String[] args)
 Main function.

Private Attributes

JPanel animatingPanel
 The panel that will animate.
JButton animateButton
 The button that causes the animation to start.
Animation sizeAnimation
 The Animation that changes the panel's size.
Animation colorAnimation
 The Animation that changes the panel's color.

Static Private Attributes

static final long serialVersionUID = 5907012541487245704L
 To prevent serialization collisions.
static final Dimension WINDOW_SIZE = new Dimension(640, 480)
 The initial size of the window.
static final double[] FINAL_COLOR_COMPONENTS = new double[] { 0.0, 1.0, 0.0 }
 The components of the Color we want the panel to be at the end of the animation (currently green).
static final double[] INITIAL_COLOR_COMPONENTS = new double[] { 0.0, 0.0, 1.0 }
 The components of the Color we want the panel to be at the beginning of the animation (currently blue).
static final double ANIMATION_DURATION = 0.5
 How long the animation should take, in seconds.
static final int SMALL_HEIGHT = 75
 The height of the panel when it is at its smaller size.
static final int SMALL_WIDTH = 150
 The width of the panel when it is at its smaller size.
static final int LARGE_HEIGHT = 200
 The height of the panel when it is at its larger size.
static final int LARGE_WIDTH = 250
 The width of the panel when it is at its larger size.


Constructor & Destructor Documentation

edu.cmu.hcii.calo.test.manual.AnimationDemo.AnimationDemo (  ) 

Constructs an AnimationDemo frame and shows it onscreen.


Member Function Documentation

static void edu.cmu.hcii.calo.test.manual.AnimationDemo.main ( String[]  args  )  [static]

Main function.

Just sets the look and feel and creates a window.

Parameters:
args command-line args, as if you didn't know

void edu.cmu.hcii.calo.test.manual.AnimationDemo.actionPerformed ( ActionEvent  e  ) 

Called when the animate button is clicked.

Parameters:
e the action event
See also:
java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent)

void edu.cmu.hcii.calo.test.manual.AnimationDemo.animationDidUpdate ( Animation  a  ) 

Called when one of our animations updates.

Parameters:
a the animation that updates
See also:
edu.cmu.hcii.calo.view.animation.AnimationListener.animationDidUpdate(edu.cmu.hcii.calo.view.animation.Animation)

Implements edu.cmu.hcii.calo.view.animation.AnimationListener.


Member Data Documentation

final long edu.cmu.hcii.calo.test.manual.AnimationDemo.serialVersionUID = 5907012541487245704L [static, private]

To prevent serialization collisions.

final Dimension edu.cmu.hcii.calo.test.manual.AnimationDemo.WINDOW_SIZE = new Dimension(640, 480) [static, private]

The initial size of the window.

final double [] edu.cmu.hcii.calo.test.manual.AnimationDemo.FINAL_COLOR_COMPONENTS = new double[] { 0.0, 1.0, 0.0 } [static, private]

The components of the Color we want the panel to be at the end of the animation (currently green).

final double [] edu.cmu.hcii.calo.test.manual.AnimationDemo.INITIAL_COLOR_COMPONENTS = new double[] { 0.0, 0.0, 1.0 } [static, private]

The components of the Color we want the panel to be at the beginning of the animation (currently blue).

final double edu.cmu.hcii.calo.test.manual.AnimationDemo.ANIMATION_DURATION = 0.5 [static, private]

How long the animation should take, in seconds.

final int edu.cmu.hcii.calo.test.manual.AnimationDemo.SMALL_HEIGHT = 75 [static, private]

The height of the panel when it is at its smaller size.

final int edu.cmu.hcii.calo.test.manual.AnimationDemo.SMALL_WIDTH = 150 [static, private]

The width of the panel when it is at its smaller size.

final int edu.cmu.hcii.calo.test.manual.AnimationDemo.LARGE_HEIGHT = 200 [static, private]

The height of the panel when it is at its larger size.

final int edu.cmu.hcii.calo.test.manual.AnimationDemo.LARGE_WIDTH = 250 [static, private]

The width of the panel when it is at its larger size.

JPanel edu.cmu.hcii.calo.test.manual.AnimationDemo.animatingPanel [private]

The panel that will animate.

JButton edu.cmu.hcii.calo.test.manual.AnimationDemo.animateButton [private]

The button that causes the animation to start.

Animation edu.cmu.hcii.calo.test.manual.AnimationDemo.sizeAnimation [private]

The Animation that changes the panel's size.

Animation edu.cmu.hcii.calo.test.manual.AnimationDemo.colorAnimation [private]

The Animation that changes the panel's color.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:19 2007 for CALO by  doxygen 1.5.2