public final class BasicTextAnimation extends AbstractAnimation
Animation
,
BasicTextLabel
,
AnimationFunction
,
AnimationFunctions
Constructor and Description |
---|
BasicTextAnimation(BasicTextLabel label,
long duration,
java.lang.String text,
AnimationFunction colorFunction,
AnimationFunction scaleXFunction,
AnimationFunction scaleYFunction,
AnimationFunction spaceFunction)
Constructs a text animation, that fades in a text, scales it and
fades it out.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyEffect(long time)
Applies the effect: sets color, spacing, scaling and offset,
the latter only if enabled.
|
static AnimationFunction |
cinemaFadeColorFunction(long duration,
java.awt.Color baseColor)
Creates and answers the color animation function for the default fade.
|
static BasicTextAnimation |
defaultFade(BasicTextLabel label,
long duration,
java.lang.String text,
java.awt.Color baseColor)
Creates and answers an animation, that provides a text fade-in and -out.
|
static AnimationFunction |
defaultFadeColorFunction(long duration,
java.awt.Color baseColor)
Creates and answers the color animation function for the default fade.
|
static AnimationFunction |
defaultOffsetFunction()
Returns the animation function for the default random position offset.
|
static BasicTextAnimation |
defaultScale(BasicTextLabel label,
long duration,
java.lang.String text,
java.awt.Color baseColor)
Creates and answers an animation, that provides a text fade-in
and -out and scales the text while fading out.
|
static AnimationFunction |
defaultScaleColorFunction(long duration,
java.awt.Color baseColor)
Creates and answers the animation function for the default scaling.
|
static AnimationFunction |
defaultScaleFunction(long duration)
Creates and answers the default scaling animation function.
|
static BasicTextAnimation |
defaultSpace(BasicTextLabel label,
long duration,
java.lang.String text,
java.awt.Color baseColor)
Creates and answers an animation, that provides a text fade-in
and -out and increases the glyph spacing.
|
static AnimationFunction |
defaultSpaceColorFunction(long duration,
java.awt.Color baseColor)
Creates and answers the color animation function for
the default spacing animation.
|
static AnimationFunction |
defaultSpaceFunction(long duration)
Creates and answers the default spacing animation function.
|
boolean |
isOffsetEnabled()
Answers whether the random position offset is enabled.
|
void |
setOffsetEnabled(boolean b)
Enables or disables the random position offset.
|
addAnimationListener, animate, duration, fireAnimationStarted, fireAnimationStopped, isFreezed, removeAnimationListener, toString
public BasicTextAnimation(BasicTextLabel label, long duration, java.lang.String text, AnimationFunction colorFunction, AnimationFunction scaleXFunction, AnimationFunction scaleYFunction, AnimationFunction spaceFunction)
label
- the animation target componentduration
- the animation durationtext
- the text to fade incolorFunction
- the animation function for the colorscaleXFunction
- the animation function for the horizontal scalescaleYFunction
- the animation function for the vertical scalespaceFunction
- the animation function for the glyph spacepublic static BasicTextAnimation defaultFade(BasicTextLabel label, long duration, java.lang.String text, java.awt.Color baseColor)
label
- the animation target componentduration
- the animation durationtext
- the text to fade inbaseColor
- the base color for the fade effectpublic static BasicTextAnimation defaultScale(BasicTextLabel label, long duration, java.lang.String text, java.awt.Color baseColor)
label
- the animation target componentduration
- the animation durationtext
- the text to fade inbaseColor
- the base color for the fade effectpublic static BasicTextAnimation defaultSpace(BasicTextLabel label, long duration, java.lang.String text, java.awt.Color baseColor)
label
- the animation target componentduration
- the animation durationtext
- the text to fade inbaseColor
- the base color for the fade effectpublic static AnimationFunction defaultFadeColorFunction(long duration, java.awt.Color baseColor)
duration
- the animation durationbaseColor
- the base color for the fade effectpublic static AnimationFunction cinemaFadeColorFunction(long duration, java.awt.Color baseColor)
duration
- the animation durationbaseColor
- the base color for the fade effectpublic static AnimationFunction defaultScaleColorFunction(long duration, java.awt.Color baseColor)
duration
- the animation durationbaseColor
- the base color for the fade effectpublic static AnimationFunction defaultSpaceColorFunction(long duration, java.awt.Color baseColor)
duration
- the animation durationbaseColor
- the base color for the fade effectpublic static AnimationFunction defaultOffsetFunction()
public static AnimationFunction defaultScaleFunction(long duration)
duration
- the animation durationpublic static AnimationFunction defaultSpaceFunction(long duration)
duration
- the animation durationprotected void applyEffect(long time)
applyEffect
in class AbstractAnimation
time
- the render timepublic boolean isOffsetEnabled()
public void setOffsetEnabled(boolean b)
b
- the new enablementCopyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.