fr.lri.swingstates.animations
Class AnimationScaleBy
java.lang.Object
fr.lri.swingstates.animations.Animation
fr.lri.swingstates.animations.AnimationScaleBy
public class AnimationScaleBy
- extends Animation
An animation that never stops, i.e. number of "laps" = -1, and scales a CElement by fixed scale factors along the x-axis and the y-axis every 40 milliseconds.
- Author:
- Caroline Appert
|
Constructor Summary |
AnimationScaleBy(double dxScale,
double dyScale)
Builds a "scaleBy" 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 |
AnimationScaleBy
public AnimationScaleBy(double dxScale,
double dyScale)
- Builds a "scaleBy" animation.
- Parameters:
dxScale - The fixed scale factor along the x-axis.dyScale - The fixed scale factor along the 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.
getDeltaScaleX
public double getDeltaScaleX()
- Returns:
- the fixed scale factor along the x-axis.
getDeltaScaleY
public double getDeltaScaleY()
- Returns:
- the fixed scale factor along the y-axis.
setDelta
public AnimationScaleBy setDelta(double dx,
double dy)
- Sets the fixed scale factors along the x-axis and y-axis.
- Parameters:
dx - The fixed scale factor along the x-axis.dy - The fixed scale factor along the y-axis.
- Returns:
- this animation.