Logo Search packages:      
Sourcecode: libjgoodies-animation-java version File versions  Download package

com::jgoodies::animation::animations::BasicTextAnimation::BasicTextAnimation ( BasicTextLabel  label,
long  duration,
String  text,
AnimationFunction  colorFunction,
AnimationFunction  scaleXFunction,
AnimationFunction  scaleYFunction,
AnimationFunction  spaceFunction 
) [inline]

Constructs a text animation, that fades in a text, scales it and fades it out. Uses the given color and scaling functions.

Parameters:
label the animation target component
duration the animation duration
text the text to fade in
colorFunction the animation function for the color
scaleXFunction the animation function for the horizontal scale
scaleYFunction the animation function for the vertical scale
spaceFunction the animation function for the glyph space

Definition at line 79 of file BasicTextAnimation.java.

References com::jgoodies::animation::AnimationFunctions::asFloat(), defaultFadeColorFunction(), and defaultOffsetFunction().

Referenced by defaultFade(), defaultScale(), and defaultSpace().

                                         {

        super(duration);
        this.label = label;
        this.text = text;
        this.colorFunction =
            colorFunction != null
                ? colorFunction
                : defaultFadeColorFunction(duration, Color.DARK_GRAY);
        this.scaleXFunction =
            AnimationFunctions.asFloat(
                scaleXFunction != null
                    ? scaleXFunction
                    : AnimationFunctions.ONE);
        this.scaleYFunction =
            AnimationFunctions.asFloat(
                scaleYFunction != null
                    ? scaleYFunction
                    : AnimationFunctions.ONE);
        this.spaceFunction =
            AnimationFunctions.asFloat(
                spaceFunction != null
                    ? spaceFunction
                    : AnimationFunctions.ZERO);
        this.offsetFunction =
            AnimationFunctions.asFloat(defaultOffsetFunction());
    }


Generated by  Doxygen 1.6.0   Back to index