public class ElasticEaseOutMotion extends AbstractMotion
Constructor and Description |
---|
ElasticEaseOutMotion(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 |
computeCurrentValue(long currentTime)
Computes current value.
|
protected boolean |
isFinished(int value)
Checks whether the motion is finished or not, considering the given value.
|
getCurrentValue, getDuration, getStartValue, getStopValue, getValue, isFinished, start
public ElasticEaseOutMotion(int start, int stop, long maxDuration)
start
- the start value.stop
- the stop value.maxDuration
- the maximum duration of the motion.protected int computeCurrentValue(long currentTime)
AbstractMotion
computeCurrentValue
in class AbstractMotion
currentTime
- the elapsed time since the beginning.protected boolean isFinished(int value)
AbstractMotion
By default, the motion is finished if the value reach (or exceed) the stop value.
isFinished
in class AbstractMotion
value
- the value to check with.true
if the motion is finished, false
otherwise.