| Constructor and Description |
|---|
NoMotion(int start,
int stop)
Creates a motion for a move from start to stop.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentValue()
Computes the current value of the motion.
|
long |
getDuration()
Gets the motion duration.
|
int |
getStartValue()
Gets the start value of the motion.
|
int |
getStopValue()
Gets the stop value of the motion.
|
int |
getValue(long elapsed)
Gets the value of the motion for a specific elapsed time.
|
boolean |
isFinished()
Gets whether the motion is finished or not.
|
void |
start()
Starts (or starts again) the motion.
|
public NoMotion(int start,
int stop)
start - the start value.stop - the stop value.public int getCurrentValue()
MotionIf the motion is finished, returns the stop value.
getCurrentValue in interface MotionMotion.isFinished()public long getDuration()
MotiongetDuration in interface Motionpublic int getStartValue()
MotiongetStartValue in interface Motionpublic int getStopValue()
MotiongetStopValue in interface Motionpublic int getValue(long elapsed)
Motionpublic boolean isFinished()
MotionA motion is finished when the current value is the stop one.
isFinished in interface Motiontrue if the motion is finished, false otherwise.