public class EasingActivity
extends org.piccolo2d.activities.PInterpolatingActivity
| Constructor and Description |
|---|
EasingActivity(EasingFunction easingFunction,
long duration)
Create a new easing activity with the specified easing function and
duration in milliseconds.
|
EasingActivity(EasingFunction easingFunction,
long duration,
long stepRate,
long startTime,
int loopCount,
int mode)
Create a new easing activity with the specified easing function and
duration in milliseconds.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
activityFinished() |
protected void |
activityStarted() |
protected void |
activityStep(long elapsed) |
void |
setRelativeTargetValue(float value) |
protected void |
setRelativeTargetValueAdjustingForMode(float value) |
void |
setSlowInSlowOut(boolean slowInSlowOut) |
computeSlowInSlowOut, getFirstLoop, getLoopCount, getMode, getSlowInSlowOut, setDuration, setFirstLoop, setLoopCount, setMode, terminatepublic EasingActivity(EasingFunction easingFunction, long duration)
easingFunction - easing function, must not be nullduration - duration in milliseconds, must be at least 1 mspublic EasingActivity(EasingFunction easingFunction, long duration, long stepRate, long startTime, int loopCount, int mode)
easingFunction - easing function, must not be nullduration - duration in milliseconds, must be at least 1 msstepRate - step rate in millisecondsstartTime - start time in milliseconds, relative to System.currentTimeMillis()loopCount - number of times this easing activity should reschedule itselfmode - defines how this easing activity interpolates between statespublic final void setSlowInSlowOut(boolean slowInSlowOut)
Overridden to throw an UnsupportedOperationException. Use the easing function specified in this class' constructor instead.
setSlowInSlowOut in class org.piccolo2d.activities.PInterpolatingActivitypublic void setRelativeTargetValue(float value)
The typical interval for interpolated activities is 0.0f to
1.0f, inclusive. An easing interpolation function allows for
overshooting this interval range in both directions, so the valid interval for
the specified value is -1.0f to 2.0f, inclusive.
setRelativeTargetValue in class org.piccolo2d.activities.PInterpolatingActivityprotected void activityStarted()
If subclasses override this method, they must call super.activityStarted().
activityStarted in class org.piccolo2d.activities.PInterpolatingActivityprotected final void activityStep(long elapsed)
This method has been made final to prevent subclasses from overriding its behaviour.
activityStep in class org.piccolo2d.activities.PInterpolatingActivityprotected void activityFinished()
If subclasses override this method, they must call super.activityFinished().
activityFinished in class org.piccolo2d.activities.PInterpolatingActivityprotected final void setRelativeTargetValueAdjustingForMode(float value)
Overridden to evaluate the easing function against the specified value.
setRelativeTargetValueAdjustingForMode in class org.piccolo2d.activities.PInterpolatingActivityCopyright (c) 2009-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).