fr.lri.swingstates.animations
Class AnimationTranslateBy
java.lang.Object
fr.lri.swingstates.animations.Animation
fr.lri.swingstates.animations.AnimationTranslateBy
public class AnimationTranslateBy
- extends Animation
An animation that never stops, i.e. number of "laps" = -1, and translates a CElement by fixed steps along the x-axis and y-axis every 40 milliseconds.
- Author:
- Caroline Appert
|
Method Summary |
double |
getDx()
|
double |
getDy()
|
AnimationTranslateBy |
setDelta(double dx,
double dy)
Sets the fixed steps along the x-axis and y-axis. |
void |
step(double t)
Override this abstract to specify the effect of this animation. |
| Methods inherited from class fr.lri.swingstates.animations.Animation |
addTag, addTag, doResume, doStart, doStop, doSuspend, getAnimated, getDelay, getLapDuration, getNbLaps, getPacingFunction, hasTag, hasTag, isStarted, isSuspended, removeTag, removeTag, resetAnimationManager, resume, setAnimatedElement, setCanvas, setDelay, setFunction, setLapDuration, setNbLaps, start, stop, suspend |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnimationTranslateBy
public AnimationTranslateBy(double dx,
double dy)
- Builds a "translateBy" animation.
- Parameters:
dx - The fixed step of translation along x-axis.dy - The fixed step of translation along y-axis.
step
public void step(double t)
- Override this abstract to specify the effect of this animation.
- Specified by:
step in class Animation
- Parameters:
t - The parameter of this animation.
getDx
public double getDx()
- Returns:
- the fixed step of translation along x-axis.
getDy
public double getDy()
- Returns:
- the fixed step of translation along y-axis.
setDelta
public AnimationTranslateBy setDelta(double dx,
double dy)
- Sets the fixed steps along the x-axis and y-axis.
- Parameters:
dx - The fixed step of translation along x-axis.dy - The fixed step of translation along y-axis.
- Returns:
- this animation.