fr.lri.swingstates.animations
Class AnimationFillPaint

java.lang.Object
  extended by fr.lri.swingstates.animations.Animation
      extended by fr.lri.swingstates.animations.AnimationFillPaint

public class AnimationFillPaint
extends Animation

An animation that changes the fill color of a CElement to a given color smoothly by refreshing every 40 milliseconds.

Author:
Caroline Appert

Field Summary
 
Fields inherited from class fr.lri.swingstates.animations.Animation
FUNCTION_LINEAR, FUNCTION_SIGMOID, INFINITE_NUMBER_OF_LAPS
 
Constructor Summary
AnimationFillPaint(java.awt.Color colorTarget)
          Builds a "fillPaint" animation.
 
Method Summary
 java.awt.Color getColorTarget()
           
 Animation setAnimatedElement(CElement ce)
          Sets the CElement that must be animated by this animation.
 fr.lri.swingstates.animations.AnimationPaint setColorTarget(java.awt.Color colorTarget)
          Sets the final color.
 void step(double t)
          Override this abstract to specify the effect of this animation.
 
Methods inherited from class fr.lri.swingstates.animations.Animation
addTag, addTag, doResume, doStart, doStop, doSuspend, getAnimated, getDelay, getLapDuration, getNbLaps, getPacingFunction, hasTag, hasTag, isStarted, isSuspended, removeTag, removeTag, resetAnimationManager, resume, setCanvas, setDelay, setFunction, setLapDuration, setNbLaps, start, stop, suspend
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationFillPaint

public AnimationFillPaint(java.awt.Color colorTarget)
Builds a "fillPaint" animation.

Parameters:
colorTarget - The final color.
Method Detail

step

public void step(double t)
Override this abstract to specify the effect of this animation.

Specified by:
step in class Animation
Parameters:
t - The parameter of this animation.

setAnimatedElement

public Animation setAnimatedElement(CElement ce)
Sets the CElement that must be animated by this animation. If the canvas that must received animation events has not yet been set, it is set to the canvas to which belongs this CElement.

Overrides:
setAnimatedElement in class Animation
Parameters:
ce - The CElement to animate.
Returns:
this animation.

getColorTarget

public java.awt.Color getColorTarget()
Returns:
the final color.

setColorTarget

public fr.lri.swingstates.animations.AnimationPaint setColorTarget(java.awt.Color colorTarget)
Sets the final color.

Parameters:
colorTarget - The final color.
Returns:
this animation.