org.jvnet.lafwidget.animation
Class FadeConstantStep

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

public class FadeConstantStep
extends java.lang.Object
implements FadeStep

Default implementation of FadeStep for linear (constant-step) fades.

Author:
Kirill Grouchnikov

Field Summary
protected  float step
          The step value.
 
Constructor Summary
FadeConstantStep(float step)
          Creates a default constant 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

step

protected float step
The step value.

Constructor Detail

FadeConstantStep

public FadeConstantStep(float step)
Creates a default constant implementation.

Parameters:
step - The step value.
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-1.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.