Inheritance diagram for edu.cmu.hcii.calo.test.manual.AnimationDemo:
Causes a panel to change size and color when a button is clicked.
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. |
edu.cmu.hcii.calo.test.manual.AnimationDemo.AnimationDemo | ( | ) |
Constructs an AnimationDemo frame and shows it onscreen.
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.
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.
e | the action event |
void edu.cmu.hcii.calo.test.manual.AnimationDemo.animationDidUpdate | ( | Animation | a | ) |
Called when one of our animations updates.
a | the animation that updates |
Implements edu.cmu.hcii.calo.view.animation.AnimationListener.
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.
The Animation that changes the panel's size.
The Animation that changes the panel's color.