org.jvnet.lafwidget.animation
Class FadeDecelerationStep

java.lang.Object
  extended by org.jvnet.lafwidget.animation.FadeDecelerationStep
All Implemented Interfaces:
FadeStep

public class FadeDecelerationStep
extends java.lang.Object
implements FadeStep

Implementation of FadeStep for decelerated fades.

Author:
Kirill Grouchnikov

Field Summary
protected  float decelerationFactor
          The deceleration factor.
protected  FadeStep delegate
          Delegate.
 
Constructor Summary
FadeDecelerationStep(FadeStep delegate, float decelerationFactor)
          Creates an decelerated implementation.
 
Method Summary
 float getNextStep(FadeKind fadeKind, float currFadePosition, boolean isFadeIn, boolean isLooping)
          Returns the next fade cycle step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected FadeStep delegate
Delegate.


decelerationFactor

protected float decelerationFactor
The deceleration factor.

Constructor Detail

FadeDecelerationStep

public FadeDecelerationStep(FadeStep delegate,
                            float decelerationFactor)
Creates an decelerated implementation.

Parameters:
delegate - Delegate.
decelerationFactor - Deceleration factor.
Method Detail

getNextStep

public float getNextStep(FadeKind fadeKind,
                         float currFadePosition,
                         boolean isFadeIn,
                         boolean isLooping)
Description copied from interface: FadeStep
Returns the next fade cycle step.

Specified by:
getNextStep in interface FadeStep
Parameters:
fadeKind - Fade kind.
currFadePosition - Current fade position - guaranteed to be in 0.0-10.0 range.
isFadeIn - If true, the current fade cycle is fading in.
isLooping - If true, the fade is looping.
Returns:
The next fade cycle step.