org.formaria.swing.animation
Class FadeInStep

java.lang.Object
  extended by org.formaria.swing.animation.FadeInStep
All Implemented Interfaces:
AnimationStep

public class FadeInStep
extends java.lang.Object
implements AnimationStep

A colour fade-in

Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.

$Revision: 1.8 $


Constructor Summary
FadeInStep()
          Creates a new instance of FadeInStep
 
Method Summary
 void apply(Animator at, java.awt.Graphics2D g2)
          Advance to the next step in the animation
 void init()
          Set the initial state
 boolean isAnimated(Animator at)
          Is the animation loop still active/running
 boolean isFinished(Animator at)
          Is the animation loop finished
 void reset()
          Reset the animation to its initial state
 void setEndColor(java.awt.Color ec)
          Set the color used once the fade in has completed
 void setStartColor(java.awt.Color sc)
          Set the color used at the start of the fade-in, normally this is the background color
 void step(Animator at)
          Move to the next step in the animation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FadeInStep

public FadeInStep()
Creates a new instance of FadeInStep

Method Detail

init

public void init()
Set the initial state


isFinished

public boolean isFinished(Animator at)
Is the animation loop finished

Specified by:
isFinished in interface AnimationStep
Parameters:
at - the animation thread on which this object is running
Returns:
true if the animation has completed

isAnimated

public boolean isAnimated(Animator at)
Is the animation loop still active/running

Specified by:
isAnimated in interface AnimationStep
Parameters:
at - the animation thread on which this object is running
Returns:
true if the animation has started and is still in progress

setStartColor

public void setStartColor(java.awt.Color sc)
Set the color used at the start of the fade-in, normally this is the background color

Parameters:
sc - the start/initial color

setEndColor

public void setEndColor(java.awt.Color ec)
Set the color used once the fade in has completed

Parameters:
ec - the end color

apply

public void apply(Animator at,
                  java.awt.Graphics2D g2)
Advance to the next step in the animation

Specified by:
apply in interface AnimationStep
Parameters:
g2 - the graphics context
at - the animation thread on which this object is running

reset

public void reset()
Reset the animation to its initial state

Specified by:
reset in interface AnimationStep

step

public void step(Animator at)
Move to the next step in the animation

Specified by:
step in interface AnimationStep
Parameters:
at - the animation thread