com.jgoodies.animation.animations

Class FanAnimation

Implemented Interfaces:
Animation

public final class FanAnimation
extends AbstractAnimation

An animation that rotates a fan that consists of a set of translucent sectors.
Version:
$Revision: 1.1 $
Author:
Karsten Lentzsch
See Also:
FanComponent, FanRenderer

Field Summary

static double
DEFAULT_ANTICLOCKWISE_ROTATION
static double
DEFAULT_CLOCKWISE_ROTATION

Constructor Summary

FanAnimation(FanComponent fan, long duration, AnimationFunction rotationFunction)
Constructs an animation that rotates a fan using the given fan component, duration and rotation animation function.

Method Summary

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
defaultRotationFunction(long duration)
Creates and answers an animation function for the default rotation.

Methods inherited from class com.jgoodies.animation.AbstractAnimation

addAnimationListener, animate, applyEffect, duration, fireAnimationStarted, fireAnimationStopped, isFreezed, removeAnimationListener, toString

Field Details

DEFAULT_ANTICLOCKWISE_ROTATION

public static final double DEFAULT_ANTICLOCKWISE_ROTATION
Field Value:
0.0

DEFAULT_CLOCKWISE_ROTATION

public static final double DEFAULT_CLOCKWISE_ROTATION
Field Value:
0.0

Constructor Details

FanAnimation

public FanAnimation(FanComponent fan,
                    long duration,
                    AnimationFunction rotationFunction)
Constructs an animation that rotates a fan using the given fan component, duration and rotation animation function.
Parameters:
fan - the fan component animation target
duration - the animation duration
rotationFunction - the rotation animation function

Method Details

applyEffect

protected void applyEffect(long time)
Applies the effect: sets the time-based rotation.
Overrides:
applyEffect in interface AbstractAnimation
Parameters:
time - the render time

defaultFan

public static FanAnimation defaultFan(FanComponent fan,
                                      long duration)
Creates and answers the default fan animation.
Parameters:
fan - the fan component animation target
duration - the animation duration
Returns:
a default fan animation

defaultRotationFunction

public static AnimationFunction defaultRotationFunction(long duration)
Creates and answers an animation function for the default rotation.
Parameters:
duration - the animation duration
Returns:
an animation function for the default rotation

Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.