public final class FanAnimation extends AbstractAnimation
FanComponent,
FanRenderer| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_ANTICLOCKWISE_ROTATION |
static double |
DEFAULT_CLOCKWISE_ROTATION |
| Constructor and Description |
|---|
FanAnimation(FanComponent fan,
long duration,
AnimationFunction<Float> rotationFunction)
Constructs an animation that rotates a fan using the given fan component,
duration and rotation animation function.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyEffect(long time)
Applies the effect: sets the time-based rotation.
|
static FanAnimation |
defaultFan(FanComponent fan,
long duration)
Creates and answers the default fan animation.
|
static AnimationFunction<Float> |
defaultRotationFunction(long duration)
Creates and answers an animation function for the default rotation.
|
addAnimationListener, animate, duration, fireAnimationStarted, fireAnimationStopped, isFreezed, removeAnimationListener, toStringpublic static final double DEFAULT_CLOCKWISE_ROTATION
public static final double DEFAULT_ANTICLOCKWISE_ROTATION
public FanAnimation(FanComponent fan, long duration, AnimationFunction<Float> rotationFunction)
fan - the fan component animation targetduration - the animation durationrotationFunction - the rotation animation functionpublic static FanAnimation defaultFan(FanComponent fan, long duration)
fan - the fan component animation targetduration - the animation durationpublic static AnimationFunction<Float> defaultRotationFunction(long duration)
duration - the animation durationprotected void applyEffect(long time)
applyEffect in class AbstractAnimationtime - the render timeCopyright © 2015 JGoodies Software GmbH. All rights reserved.