com.jgoodies.animation.components
Class GlyphLabel
JComponent
com.jgoodies.animation.components.GlyphLabel
public final class GlyphLabel
extends JComponent
A Swing component that can transform a text's individual glyphs.
GlyphLabel(String text, long duration, long glyphDelay) - Creates a
GlyphLabel for the given text, duration and
delay between the individual glyphs.
|
GlyphLabel(String text, long duration, long glyphDelay, Color baseColor) - Creates a
GlyphLabel for the given text, duration, base color
and delay between the individual glyphs.
|
PROPERTYNAME_HEIGHT_MODE
public static final String PROPERTYNAME_HEIGHT_MODE
PROPERTYNAME_TEXT
public static final String PROPERTYNAME_TEXT
PROPERTYNAME_TIME
public static final String PROPERTYNAME_TIME
GlyphLabel
public GlyphLabel(String text,
long duration,
long glyphDelay)
Creates a GlyphLabel
for the given text, duration and
delay between the individual glyphs.
text
- the initial textduration
- the duration of the whole animationglyphDelay
- a delay between the animation of the individual glyphs
GlyphLabel
public GlyphLabel(String text,
long duration,
long glyphDelay,
Color baseColor)
Creates a GlyphLabel
for the given text, duration, base color
and delay between the individual glyphs.
text
- the initial textduration
- the duration of the whole animationglyphDelay
- a delay between the animation of the individual glyphsbaseColor
- the color used as a basis for the translucent
glyph foreground colors
defaultColorFunction
public static AnimationFunction defaultColorFunction(long duration,
Color baseColor)
Creates and returns the default color function for the given duration
and base color.
duration
- the duration of the animationbaseColor
- the color used as a basis for the translucent colors
- an animation function that maps times to translucent glyph colors
defaultScaleFunction
public static AnimationFunction defaultScaleFunction(long duration)
Creates and returns the default scale function for the given duration.
duration
- the duration of the whole animation
- an animation function that maps times to glyph scales
getText
public String getText()
getTime
public long getTime()
paintComponent
public void paintComponent(Graphics g)
Paints the component. Sets high-fidelity rendering hints,
then invoke the renderer to render the glyphs.
g
- the Graphics object to render on
setHeightMode
public void setHeightMode(HeightMode newHeightMode)
setText
public void setText(String newText)
setTime
public void setTime(long newTime)
Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.