|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Animation
The Animation interface that must be used for all Animations. All methods must be implemented to allow the Animation Object to be used in all animation applications.
Status fields are provided for usage in Animation objects involving status and mesages. Others may be added if necessary.
Field Summary | |
---|---|
static java.lang.String |
ANIMATION_MESSAGE
Constant for the MESSAGE status. |
static java.lang.String |
BEGIN
Constant for the BEGIN status. |
static java.lang.String |
FINISH
Constant for the FINISH status. |
static java.lang.String |
PAUSE
Constant for the PAUSE status. |
static java.lang.String |
PLAY
Constant for the PLAY status. |
static java.lang.String |
REDRAW
Constant for the REDRAW status. |
static java.lang.String |
REWIND
Constant for the REVERSE status. |
static java.lang.String |
STEP
Constant for the STEP status. |
static java.lang.String |
STOP
Constant for the STOP status. |
Method Summary | |
---|---|
void |
addAnimationListener(AnimationListener l)
Adds an animationListener that recieves meaningful events from the animation, according to the Animation interface and the AnimationEvent . |
void |
addDescription(java.lang.String d)
Adds a description that may be used to describe to the listener the type of event occuring. |
void |
drawAnimation(java.awt.Graphics2D g2)
Draws the animation of the next step, using the status of the animation (Animation.PLAY, Animation.PAUSE and so forth). |
void |
drawAnimation(java.awt.Graphics2D g2,
java.lang.String status)
Draws the animation of the next step, using the status of the animation (Animation.PLAY, Animation.PAUSE and so forth). |
java.lang.String |
getDescription()
Gets the description added with addDescription and should be accessed through the listener. |
java.lang.String |
getStatus()
Gets the status of the Animation using a command within Animation interface. |
boolean |
getStep()
Gets whether the current animation is in stepping mode or not. |
int |
getStepTime()
Gets the step size for the animation. |
void |
removeAnimationListener(AnimationListener l)
Removes an animationListener from the animation, according to the Animation interface and the AnimationEvent . |
void |
setStatus(java.lang.String cmd)
Sets the status of the Animation using a command within Animation interface. |
void |
setStep(boolean b)
Sets whether the current animation is in stepping mode or not. |
void |
setStepTime(int t)
Sets the step size for the animation. |
Field Detail |
---|
static final java.lang.String BEGIN
static final java.lang.String STOP
static final java.lang.String PLAY
static final java.lang.String REWIND
static final java.lang.String PAUSE
static final java.lang.String FINISH
static final java.lang.String REDRAW
static final java.lang.String STEP
static final java.lang.String ANIMATION_MESSAGE
Method Detail |
---|
void setStepTime(int t)
t
- the step sizeint getStepTime()
void addAnimationListener(AnimationListener l)
AnimationEvent
.
l
- the listener for the AnimationEvents occuring within this Animation.void removeAnimationListener(AnimationListener l)
AnimationEvent
.
l
- the listener removed from recieving the AnimationEvents occuring within this Animation.void addDescription(java.lang.String d)
getDescription
.
d
- the string defining the description.java.lang.String getDescription()
addDescription
and should be accessed through the listener.
void setStep(boolean b)
b
- boolean defining whether it is skipping.boolean getStep()
void setStatus(java.lang.String cmd)
Animation
interface.
cmd
- cmd that the Animation's status is set to.java.lang.String getStatus()
Animation
interface.
void drawAnimation(java.awt.Graphics2D g2)
The starting status of the animation is defined as Animation.PLAY
b
- boolean defining whether it is skipping.void drawAnimation(java.awt.Graphics2D g2, java.lang.String status)
g2
- the graphics to which the animation step should be drawn.status
- the starting status of the animation (what the animation is set to, if in a starting phase like BEGIN or STEP).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |