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.Color
baseColor
private AnimationFunction<java.lang.Integer>
fAlpha
-
Constructor Summary
Constructors Modifier Constructor Description private
AlphaColorAnimationFunction(AnimationFunction<java.lang.Integer> fAlpha, java.awt.Color baseColor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
duration()
Returns the length of this function's valid time interval.java.awt.Color
valueAt(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:AnimationFunction
Returns the length of this function's valid time interval.- Specified by:
duration
in 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:AnimationFunction
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.- Specified by:
valueAt
in interfaceAnimationFunction<java.awt.Color>
- Parameters:
time
- the time used to determine the animation effect- Returns:
- the function value at the given time
-
-