|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.lri.swingstates.animations.Animation
fr.lri.swingstates.animations.AnimationTranslateTo
public class AnimationTranslateTo
An animation that translates a CElement to a given location in one second by translating smoothly this CElement every 40 milliseconds.
| Field Summary |
|---|
| Fields inherited from class fr.lri.swingstates.animations.Animation |
|---|
FUNCTION_LINEAR, FUNCTION_SIGMOID, INFINITE_NUMBER_OF_LAPS |
| Constructor Summary | |
|---|---|
AnimationTranslateTo(double xTarget,
double yTarget)
Builds a "translateTo" animation. |
|
| Method Summary | |
|---|---|
void |
doStart()
Method called when this animation is started. |
double |
getTranslateXTarget()
|
double |
getTranslateYTarget()
|
Animation |
setAnimatedElement(CElement ce)
Sets the CElement that must be animated by this animation. |
AnimationTranslateTo |
setTranslateTarget(double xTarget,
double yTarget)
Sets the final location. |
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, doStop, doSuspend, getAnimated, getDelay, getLapDuration, getNbLaps, getPacingFunction, hasTag, hasTag, isStarted, isSuspended, removeTag, removeTag, resetAnimationManager, resume, 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 |
|---|
public AnimationTranslateTo(double xTarget,
double yTarget)
xTarget - The x of the final position.yTarget - The y of the final position.| Method Detail |
|---|
public void step(double t)
step in class Animationt - The parameter of this animation.public void doStart()
doStart in class AnimationAnimation.start()public Animation setAnimatedElement(CElement ce)
CElement that must be animated by this animation.
If the canvas that must received animation events has not yet been set,
it is set to the canvas to which belongs this CElement.
setAnimatedElement in class Animationce - The CElement to animate.
public double getTranslateXTarget()
public double getTranslateYTarget()
public AnimationTranslateTo setTranslateTarget(double xTarget,
double yTarget)
xTarget - The x-coordinate of the final location.yTarget - The y-coordinate of the final location.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||