Package com.jgoodies.animation
Class AnimationFunctions.AlphaColorAnimationFunction
- java.lang.Object
-
- com.jgoodies.animation.AnimationFunctions.AlphaColorAnimationFunction
-
- All Implemented Interfaces:
AnimationFunction<java.awt.Color>
- Enclosing class:
- AnimationFunctions
private static final class AnimationFunctions.AlphaColorAnimationFunction extends java.lang.Object implements AnimationFunction<java.awt.Color>
Helper class for animation functions that answer translucent colors.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.ColorbaseColorprivate AnimationFunction<java.lang.Integer>fAlpha
-
Constructor Summary
Constructors Modifier Constructor Description privateAlphaColorAnimationFunction(AnimationFunction<java.lang.Integer> fAlpha, java.awt.Color baseColor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longduration()Returns the length of this function's valid time interval.java.awt.ColorvalueAt(long time)Returns the function value at a given time in the valid time interval.
-
-
-
Field Detail
-
baseColor
private final java.awt.Color baseColor
-
fAlpha
private final AnimationFunction<java.lang.Integer> fAlpha
-
-
Constructor Detail
-
AlphaColorAnimationFunction
private AlphaColorAnimationFunction(AnimationFunction<java.lang.Integer> fAlpha, java.awt.Color baseColor)
-
-
Method Detail
-
duration
public long duration()
Description copied from interface:AnimationFunctionReturns the length of this function's valid time interval.- Specified by:
durationin interfaceAnimationFunction<java.awt.Color>- Returns:
- the length of this function's valid time interval
-
valueAt
public java.awt.Color valueAt(long time)
Description copied from interface:AnimationFunctionReturns 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.- Specified by:
valueAtin interfaceAnimationFunction<java.awt.Color>- Parameters:
time- the time used to determine the animation effect- Returns:
- the function value at the given time
-
-