com.jgoodies.animation.animations
Class BasicTextAnimation
- Animation
public final class BasicTextAnimation
A basic text animation that fades in a text, changes the x and y scaling,
the position, and the space between glyphs.
protected void | applyEffect(long time) - Applies the effect: sets color, spacing, scaling and offset,
the latter only if enabled.
|
static AnimationFunction | cinemaFadeColorFunction(long duration, Color baseColor) - Creates and answers the color animation function for the default fade.
|
static BasicTextAnimation | defaultFade(BasicTextLabel label, long duration, String text, Color baseColor) - Creates and answers an animation, that provides a text fade-in and -out.
|
static AnimationFunction | defaultFadeColorFunction(long duration, 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, String text, 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, 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, String text, 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, 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.
|
BasicTextAnimation
public BasicTextAnimation(BasicTextLabel label,
long duration,
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. Uses the given color and scaling functions.
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 space
applyEffect
protected void applyEffect(long time)
Applies the effect: sets color, spacing, scaling and offset,
the latter only if enabled.
- applyEffect in interface AbstractAnimation
cinemaFadeColorFunction
public static AnimationFunction cinemaFadeColorFunction(long duration,
Color baseColor)
Creates and answers the color animation function for the default fade.
duration
- the animation durationbaseColor
- the base color for the fade effect
- a Color-valued animation function for the default fade
defaultFade
public static BasicTextAnimation defaultFade(BasicTextLabel label,
long duration,
String text,
Color baseColor)
Creates and answers an animation, that provides a text fade-in and -out.
label
- the animation target componentduration
- the animation durationtext
- the text to fade inbaseColor
- the base color for the fade effect
- an animation with a default text fade
defaultFadeColorFunction
public static AnimationFunction defaultFadeColorFunction(long duration,
Color baseColor)
Creates and answers the color animation function for the default fade.
duration
- the animation durationbaseColor
- the base color for the fade effect
- a Color-valued animation function for the default fade
defaultOffsetFunction
public static AnimationFunction defaultOffsetFunction()
Returns the animation function for the default random position offset.
- an animation function for a default random offset
defaultScale
public static BasicTextAnimation defaultScale(BasicTextLabel label,
long duration,
String text,
Color baseColor)
Creates and answers an animation, that provides a text fade-in
and -out and scales the text while fading out.
label
- the animation target componentduration
- the animation durationtext
- the text to fade inbaseColor
- the base color for the fade effect
- an animation with a default scaling text effect
defaultScaleColorFunction
public static AnimationFunction defaultScaleColorFunction(long duration,
Color baseColor)
Creates and answers the animation function for the default scaling.
duration
- the animation durationbaseColor
- the base color for the fade effect
- a Color-valued animation function for the default scaling
defaultScaleFunction
public static AnimationFunction defaultScaleFunction(long duration)
Creates and answers the default scaling animation function.
duration
- the animation duration
- an animation function for the default scaling effect
defaultSpace
public static BasicTextAnimation defaultSpace(BasicTextLabel label,
long duration,
String text,
Color baseColor)
Creates and answers an animation, that provides a text fade-in
and -out and increases the glyph spacing.
label
- the animation target componentduration
- the animation durationtext
- the text to fade inbaseColor
- the base color for the fade effect
- an animation with a default glyph spacing effect
defaultSpaceColorFunction
public static AnimationFunction defaultSpaceColorFunction(long duration,
Color baseColor)
Creates and answers the color animation function for
the default spacing animation.
duration
- the animation durationbaseColor
- the base color for the fade effect
- a Color-valued animation function for the default spacing
defaultSpaceFunction
public static AnimationFunction defaultSpaceFunction(long duration)
Creates and answers the default spacing animation function.
duration
- the animation duration
- an animation function for the default spacing effect
isOffsetEnabled
public boolean isOffsetEnabled()
Answers whether the random position offset is enabled.
- true indicates offset enabled, false disabled
setOffsetEnabled
public void setOffsetEnabled(boolean b)
Enables or disables the random position offset.
Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.