| java.lang.Object com.jgoodies.animation.AnimationFunctions
AnimationFunctions | final public class AnimationFunctions (Code) | | This class consists only of static methods that construct and operate on
AnimationFunction s.
author: Karsten Lentzsch version: $Revision: 1.1 $ See Also: AnimationFunction |
Inner Class :public static class FloatFunction | |
Method Summary | |
public static AnimationFunction | alphaColor(AnimationFunction f, Color baseColor) Creates and returns an animation function that returns time-based
sRGB colors that are built from a given base color and
an animation function of alpha values. | public static FloatFunction | asFloat(AnimationFunction f) Creates a time-based function that wraps the given Float-based animation
function to return the corresponding float values. | public static AnimationFunction | concat(AnimationFunction first, AnimationFunction second) Concatenates the fiven animation functions and returns a compound
animation function that represents the concatenation. | public static AnimationFunction | constant(long duration, Object value) Creates and returns an animation function that returns a constant value
over the given duration. | public static AnimationFunction | discrete(long duration, Object[] values) Creates and returns a discrete animation function for the
given duration and values. | public static AnimationFunction | discrete(long duration, Object[] values, float[] keyTimes) Creates and returns a discrete animation function for the given duration,
values and interpolation key times. | public static AnimationFunction | fromBy(long duration, float from, float by) Creates and returns a linear animation function for the given duration
that returns Float in interval [from, from + by]. | public static AnimationFunction | fromTo(long duration, float from, float to) Ceates and returns a linear animation function with the given duration. | public static AnimationFunction | linear(long duration, Object[] values) Creates and returns a linear animation function that is defined
by an array of numeric values; these are distributed equally
over the duration. | public static AnimationFunction | linear(long duration, Object[] values, float[] keyTimes) Creates and returns a linear animation function that is defined
by an array of numeric values and an array of relative key times. | public static AnimationFunction | linearColors(long duration, Color[] colors, float[] keyTimes) Creates an AnimationFunction that maps times
to instances of Color . | public static AnimationFunction | random(int min, int max, float changeProbability) Creates and returns an animation function that returns random values
from the interval [min, max] with a given change probability. | public static AnimationFunction | repeat(AnimationFunction f, long repeatTime) Creates and returns an animation function that is defined
by repeating the specified animation function. | public static AnimationFunction | reverse(AnimationFunction f) Creates and returns an animation function that is defined
by reverting the given animation function in time. |
alphaColor | public static AnimationFunction alphaColor(AnimationFunction f, Color baseColor)(Code) | | Creates and returns an animation function that returns time-based
sRGB colors that are built from a given base color and
an animation function of alpha values.
Useful for fading effects.
Parameters: f - the animation function of alpha values Parameters: baseColor - the base color an animation function of colors |
asFloat | public static FloatFunction asFloat(AnimationFunction f)(Code) | | Creates a time-based function that wraps the given Float-based animation
function to return the corresponding float values.
Parameters: f - the underlying animation function of floats an animation function the returns Float objects |
concat | public static AnimationFunction concat(AnimationFunction first, AnimationFunction second)(Code) | | Concatenates the fiven animation functions and returns a compound
animation function that represents the concatenation.
Parameters: first - the concatenation's first AnimationFunction Parameters: second - the concatenation's second AnimationFunction the concatenated animation function |
constant | public static AnimationFunction constant(long duration, Object value)(Code) | | Creates and returns an animation function that returns a constant value
over the given duration.
Parameters: duration - the function's duration Parameters: value - the Object that will be returned all the time a constant animation function |
discrete | public static AnimationFunction discrete(long duration, Object[] values)(Code) | | Creates and returns a discrete animation function for the
given duration and values. The values are equally distributed
over the duration.
Parameters: duration - the function's duration Parameters: values - an array of discrete result values a discrete animation function |
discrete | public static AnimationFunction discrete(long duration, Object[] values, float[] keyTimes)(Code) | | Creates and returns a discrete animation function for the given duration,
values and interpolation key times.
Parameters: duration - the function's duration Parameters: values - an array of discrete result values Parameters: keyTimes - an array of key times used to distribute the result values over the time a discrete animation function |
fromBy | public static AnimationFunction fromBy(long duration, float from, float by)(Code) | | Creates and returns a linear animation function for the given duration
that returns Float in interval [from, from + by].
Parameters: duration - the animation duration Parameters: from - the initial result value Parameters: by - the difference that is added to the initial value a linear animation function with values in [from, from + by] |
fromTo | public static AnimationFunction fromTo(long duration, float from, float to)(Code) | | Ceates and returns a linear animation function with the given duration.
The function values are Floats in the intervall [from, to].
Parameters: duration - the animation duration Parameters: from - the initial result value Parameters: to - the last result value a linear animation function with values in [from, to] |
linear | public static AnimationFunction linear(long duration, Object[] values)(Code) | | Creates and returns a linear animation function that is defined
by an array of numeric values; these are distributed equally
over the duration.
Parameters: duration - the animation duration Parameters: values - an array of values a linear animation function for the given values |
linear | public static AnimationFunction linear(long duration, Object[] values, float[] keyTimes)(Code) | | Creates and returns a linear animation function that is defined
by an array of numeric values and an array of relative key times.
Parameters: duration - the animation duration Parameters: values - an array of values Parameters: keyTimes - an array of key times used to distribute the result values over the time a linear animation function for the given values |
linearColors | public static AnimationFunction linearColors(long duration, Color[] colors, float[] keyTimes)(Code) | | Creates an AnimationFunction that maps times
to instances of Color . The mapping is interpolated
from an array of Colors using an array of key times.
Parameters: duration - the duration of this animation function Parameters: colors - the colors to interpolate. Parameters: keyTimes - an array of key times used to distribute the result values over the time. An AnimationFunction that maps times to sRGB colors.This mapping is defined by an arry of Color values and a corresponding array of key times that is used to interpolatesub-AnimationFunction for the red, green, blue and alpha values. |
random | public static AnimationFunction random(int min, int max, float changeProbability)(Code) | | Creates and returns an animation function that returns random values
from the interval [min, max] with a given change probability.
Parameters: min - the minimum result value Parameters: max - the maximum result value Parameters: changeProbability - the probability that the value changes an animation function with random values in [min, max] |
repeat | public static AnimationFunction repeat(AnimationFunction f, long repeatTime)(Code) | | Creates and returns an animation function that is defined
by repeating the specified animation function.
Parameters: f - the animation function to repeat Parameters: repeatTime - the time to repeat the function the repeated animation function |
reverse | public static AnimationFunction reverse(AnimationFunction f)(Code) | | Creates and returns an animation function that is defined
by reverting the given animation function in time.
Parameters: f - the animation function to reverse the reversed animation function |
|
|