Package com.jgoodies.animation
Interface AnimationFunction<T>
-
- Type Parameters:
T
- the return type of this function
- All Known Implementing Classes:
AbstractAnimationFunction
,AnimationFunctions.AlphaColorAnimationFunction
,AnimationFunctions.ColorFunction
,AnimationFunctions.InterpolatedAnimationFunction
,AnimationFunctions.RandomAnimationFunction
,AnimationFunctions.RepeatedAnimationFunction
,AnimationFunctions.ReversedAnimationFunction
,AnimationFunctions.SequencedAnimationFunction
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 $
- See Also:
AnimationFunctions
,AbstractAnimationFunction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
-
-