Package com.jgoodies.animation
Class AbstractAnimationFunction<T>
- java.lang.Object
-
- com.jgoodies.animation.AbstractAnimationFunction<T>
-
- All Implemented Interfaces:
AnimationFunction<T>
- Direct Known Subclasses:
AnimationFunctions.ColorFunction,AnimationFunctions.InterpolatedAnimationFunction,AnimationFunctions.RepeatedAnimationFunction,AnimationFunctions.ReversedAnimationFunction
public abstract class AbstractAnimationFunction<T> extends java.lang.Object implements AnimationFunction<T>
An abstract class that minimizes the effort required to implement theAnimationFunctioninterface.- Version:
- $Revision: 1.8 $
- See Also:
AnimationFunctions
-
-
Field Summary
Fields Modifier and Type Field Description private longdurationDescribes this animation function's duration.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAnimationFunction(long duration)Constructs anAbstractAnimationFunctionusing the given duration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckTimeRange(long time)Checks whether the given time is in the valid time range, that is a non-negative time that is smaller than this function's duration.longduration()Returns this animation function's duration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jgoodies.animation.AnimationFunction
valueAt
-
-
-
-
Method Detail
-
checkTimeRange
protected final void checkTimeRange(long time)
Checks whether the given time is in the valid time range, that is a non-negative time that is smaller than this function's duration. If not, anIllegalArgumentExceptionis thrown.- Parameters:
time- the time to be checked- Throws:
java.lang.IllegalArgumentException- if the time is outside the valid time range
-
duration
public final long duration()
Returns this animation function's duration.- Specified by:
durationin interfaceAnimationFunction<T>- Returns:
- this animation function's duration
-
-