|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.animation.AbstractAnimation
com.jgoodies.animation.animations.BasicTextAnimation
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.
Animation
,
BasicTextLabel
,
AnimationFunction
,
AnimationFunctions
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.jgoodies.animation.AbstractAnimation |
---|
addAnimationListener, animate, duration, fireAnimationStarted, fireAnimationStopped, isFreezed, removeAnimationListener, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 spaceMethod Detail |
---|
public 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 effect
public 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 effect
public 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 effect
public static AnimationFunction defaultFadeColorFunction(long duration, java.awt.Color baseColor)
duration
- the animation durationbaseColor
- the base color for the fade effect
public static AnimationFunction cinemaFadeColorFunction(long duration, java.awt.Color baseColor)
duration
- the animation durationbaseColor
- the base color for the fade effect
public static AnimationFunction defaultScaleColorFunction(long duration, java.awt.Color baseColor)
duration
- the animation durationbaseColor
- the base color for the fade effect
public static AnimationFunction defaultSpaceColorFunction(long duration, java.awt.Color baseColor)
duration
- the animation durationbaseColor
- the base color for the fade effect
public static AnimationFunction defaultOffsetFunction()
public static AnimationFunction defaultScaleFunction(long duration)
duration
- the animation duration
public static AnimationFunction defaultSpaceFunction(long duration)
duration
- the animation duration
protected void applyEffect(long time)
applyEffect
in class AbstractAnimation
time
- the render timepublic boolean isOffsetEnabled()
public void setOffsetEnabled(boolean b)
b
- the new enablement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |