com.jgoodies.animation.animations
Class FanAnimation

java.lang.Object
  extended by com.jgoodies.animation.AbstractAnimation
      extended by com.jgoodies.animation.animations.FanAnimation
All 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, duration, fireAnimationStarted, fireAnimationStopped, isFreezed, removeAnimationListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CLOCKWISE_ROTATION

public static final double DEFAULT_CLOCKWISE_ROTATION
See Also:
Constant Field Values

DEFAULT_ANTICLOCKWISE_ROTATION

public static final double DEFAULT_ANTICLOCKWISE_ROTATION
See Also:
Constant Field Values
Constructor Detail

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 Detail

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

applyEffect

protected void applyEffect(long time)
Applies the effect: sets the time-based rotation.

Specified by:
applyEffect in class AbstractAnimation
Parameters:
time - the render time


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