fr.lri.swingstates.animations
Class AnimationScaleBy

java.lang.Object
  extended by fr.lri.swingstates.animations.Animation
      extended by 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

Field Summary
 
Fields inherited from class fr.lri.swingstates.animations.Animation
FUNCTION_LINEAR, FUNCTION_SIGMOID, INFINITE_NUMBER_OF_LAPS
 
Constructor Summary
AnimationScaleBy(double dxScale, double dyScale)
          Builds a "scaleBy" animation.
 
Method Summary
 double getDeltaScaleX()
           
 double getDeltaScaleY()
           
 AnimationScaleBy setDelta(double dx, double dy)
          Sets the fixed scale factors 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
 

Constructor Detail

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.
Method Detail

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.