com.jgoodies.animation
Interface AnimationFunction<T>

Type Parameters:
T - the return type of this function
All Known Implementing Classes:
AbstractAnimationFunction

public interface AnimationFunction<T>

This interface describes time-based animation functions by their duration and a mapping from time to arbitrary values. These values are typically attribute values of an animation target, for example the width of a rectangle, the x position of a point, the color of a line, the alpha value of a panel.

For each time in the function's valid time interval, the #valueAt method returns a value that can be used to apply an animation effect in an Animation.

Version:
$Revision: 1.8 $
Author:
Karsten Lentzsch
See Also:
AnimationFunctions, AbstractAnimationFunction

Method Summary
 long duration()
          Returns the length of this function's valid time interval.
 T valueAt(long time)
          Returns the function value at a given time in the valid time interval.
 

Method Detail

duration

long duration()
Returns the length of this function's valid time interval.

Returns:
the length of this function's valid time interval

valueAt

T valueAt(long time)
Returns the function value at a given time in the valid time interval. The value is undefined for times outside this function's time interval. An implementation may throw an exception, if this method called with a time outside the time interval.

Parameters:
time - the time used to determine the animation effect
Returns:
the function value at the given time


Copyright © 2001-2013 JGoodies Software GmbH. All Rights Reserved.