public abstract class AbstractElasticMotion extends AbstractMotion
| Constructor and Description |
|---|
AbstractElasticMotion(int start,
int stop,
long maxDuration)
Creates an elastic motion for a move from start to stop.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
easeIn(long currentTime)
Gets the elastic ease in value for the given time.
|
protected int |
easeOut(long currentTime)
Gets the elastic ease out value for the given time.
|
protected boolean |
isFinished(int value)
Checks whether the motion is finished or not, considering the given value.
|
computeCurrentValue, getCurrentValue, getDuration, getStartValue, getStopValue, getValue, isFinished, startpublic AbstractElasticMotion(int start,
int stop,
long maxDuration)
start - the start value.stop - the stop value.maxDuration - the maximum duration of the motion.protected int easeIn(long currentTime)
currentTime - the elapsed time.protected int easeOut(long currentTime)
currentTime - the elapsed time.protected boolean isFinished(int value)
AbstractMotionBy default, the motion is finished if the value reach (or exceed) the stop value.
isFinished in class AbstractMotionvalue - the value to check with.true if the motion is finished, false otherwise.