01: package com.xoetrope.swing.animation;
02:
03: import java.awt.Graphics2D;
04: import org.jdesktop.animation.timing.Animator;
05:
06: /**
07: * A step in the animation such as a variation of colour or position.
08: *
09: * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
10: * the GNU Public License (GPL), please see license.txt for more details. If
11: * you make commercial use of this software you must purchase a commercial
12: * license from Xoetrope.</p>
13: * <p> $Revision: 1.5 $</p>
14: */
15: public interface AnimationStep {
16: /**
17: * Adjust the settings for the next step.
18: */
19: public void reset();
20:
21: /**
22: * Advance to the next step in the animation
23: *
24: * @param g2 the graphics context
25: * @param at the animation thread on which this object is running
26: */
27: public void apply(Animator at, Graphics2D g2);
28:
29: /**
30: * Adjust the settings for the next step.
31: *
32: * @param at the animation thread on which this object is running
33: */
34: public void step(Animator at);
35:
36: /**
37: * Is the animation loop finished
38: *
39: * @param at the animation thread on which this object is running
40: * @return true if the animation has completed
41: */
42: public boolean isFinished(Animator at);
43:
44: /**
45: * Is the animation loop still active/running
46: *
47: * @param at the animation thread on which this object is running
48: * @return true if the animation has started and is still in progress
49: */
50: public boolean isAnimated(Animator at);
51: }
|