Package com.jgoodies.animation
Class AnimationFunctions.ColorFunction
- java.lang.Object
-
- com.jgoodies.animation.AbstractAnimationFunction<java.awt.Color>
-
- com.jgoodies.animation.AnimationFunctions.ColorFunction
-
- All Implemented Interfaces:
AnimationFunction<java.awt.Color>
- Enclosing class:
- AnimationFunctions
private static final class AnimationFunctions.ColorFunction extends AbstractAnimationFunction<java.awt.Color>
Helper class for interpolating colors.
-
-
Field Summary
Fields Modifier and Type Field Description private AnimationFunction<java.lang.Integer>alphaFunctionRefers to an AnimationFunction of float values that maps a time to the alpha value of an sRGB color value.private AnimationFunction<java.lang.Integer>blueFunctionRefers to an AnimationFunction of float values that maps a time to the blue component of an sRGB color value.private AnimationFunction<java.lang.Integer>greenFunctionRefers to an AnimationFunction of float values that maps a time to the green component of an sRGB color value.private AnimationFunction<java.lang.Integer>redFunctionRefers to an AnimationFunction of float values that maps a time to the red component of an sRGB color value.
-
Constructor Summary
Constructors Modifier Constructor Description privateColorFunction(long duration, java.awt.Color[] colors, float[] keyTimes)Creates anAnimationFunctionthat maps times to instances ofColor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorvalueAt(long time)Returns the interpolated color for a given time in the valid time interval.-
Methods inherited from class com.jgoodies.animation.AbstractAnimationFunction
checkTimeRange, duration
-
-
-
-
Field Detail
-
redFunction
private final AnimationFunction<java.lang.Integer> redFunction
Refers to an AnimationFunction of float values that maps a time to the red component of an sRGB color value.
-
greenFunction
private final AnimationFunction<java.lang.Integer> greenFunction
Refers to an AnimationFunction of float values that maps a time to the green component of an sRGB color value.
-
blueFunction
private final AnimationFunction<java.lang.Integer> blueFunction
Refers to an AnimationFunction of float values that maps a time to the blue component of an sRGB color value.
-
alphaFunction
private final AnimationFunction<java.lang.Integer> alphaFunction
Refers to an AnimationFunction of float values that maps a time to the alpha value of an sRGB color value.
-
-
Constructor Detail
-
ColorFunction
private ColorFunction(long duration, java.awt.Color[] colors, float[] keyTimes)Creates anAnimationFunctionthat maps times to instances ofColor. The mapping is interpolated from an array of Colors using an array of key times.- Parameters:
duration- the duration of this animation functioncolors- the colors to interpolate.keyTimes- an array of key times used to distribute the result values over the time.
-
-