Class BasicTextAnimations
- java.lang.Object
-
- com.jgoodies.animation.swing.animations.BasicTextAnimations
-
public final class BasicTextAnimations extends java.lang.Object
Provides a text animation that shows an overlapping sequence of texts using a bunch of different effects: color fade, scaling, glyph spacing.- Version:
- $Revision: 1.6 $
- See Also:
BasicTextAnimation
-
-
Field Summary
Fields Modifier and Type Field Description private static int
FADE_TYPE
private static int
SCALE_TYPE
private static int
SPACE_TYPE
-
Constructor Summary
Constructors Modifier Constructor Description private
BasicTextAnimations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static Animation
animation(BasicTextLabel label, long duration, java.lang.String text, java.awt.Color baseColor, int type)
private static Animation
createTextSequence(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor, int type)
Creates and returns the default glyph spacing text sequence.static Animation
defaultFade(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
Creates and answers the default color fade text sequence.static Animation
defaultScale(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
Creates and answers the default scaling text sequence.static Animation
defaultSpace(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
Creates and answers the default glyph spacing text sequence.
-
-
-
Field Detail
-
FADE_TYPE
private static final int FADE_TYPE
- See Also:
- Constant Field Values
-
SCALE_TYPE
private static final int SCALE_TYPE
- See Also:
- Constant Field Values
-
SPACE_TYPE
private static final int SPACE_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
defaultFade
public static Animation defaultFade(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
Creates and answers the default color fade text sequence.- Parameters:
label1
- a text label used to blend overlabel2
- a second text label used to blend oversingleDuration
- the duration of a single animationbeginOffset
- an initial animation time offsetseparatedTexts
- a sequence of texts in a string separated by the | characterbaseColor
- the base color for the fade- Returns:
- a default fade animation
-
defaultScale
public static Animation defaultScale(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
Creates and answers the default scaling text sequence.- Parameters:
label1
- a text label used to blend overlabel2
- a second text label used to blend oversingleDuration
- the duration of a single animationbeginOffset
- an initial animation time offsetseparatedTexts
- a sequence of texts in a string separated by the | characterbaseColor
- the base color for the fade- Returns:
- a default scaling blend over animation
-
defaultSpace
public static Animation defaultSpace(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
Creates and answers the default glyph spacing text sequence.- Parameters:
label1
- a text label used to blend overlabel2
- a second text label used to blend oversingleDuration
- the duration of a single animationbeginOffset
- an initial animation time offsetseparatedTexts
- a sequence of texts in a string separated by the | characterbaseColor
- the base color for the fade- Returns:
- a default space blend over animation
-
createTextSequence
private static Animation createTextSequence(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor, int type)
Creates and returns the default glyph spacing text sequence.- Parameters:
label1
- the first label to render the sequencelabel2
- the second label to rendersingleDuration
- the duration of a step in the sequencebeginOffset
- an offset in ms between to stepsseparatedTexts
- a '|' separated lists of texts to displaybaseColor
- the color used as a basis for the texttype
- the type of the effect used to change- Returns:
- a composed animation that displays a sequence of texts
-
animation
private static Animation animation(BasicTextLabel label, long duration, java.lang.String text, java.awt.Color baseColor, int type)
-
-