|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.jgoodies.animation.components.AnimatedLabel
public final class AnimatedLabel
An anti-aliased text label that can animate text changes using a blend over effect.
Note: This is preview code that is not supported. It is more raw than other classes that you have downloaded from JGoodies.com in the past and contains known bugs.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
CENTER
|
static Color |
DEFAULT_BASE_COLOR
|
static int |
DEFAULT_FONT_EXTRA_SIZE
|
static int |
LEFT
|
static String |
PROPERTYNAME_ANIMATED
|
static String |
PROPERTYNAME_DURATION
|
static String |
PROPERTYNAME_FOREGROUND
|
static String |
PROPERTYNAME_TEXT
|
static int |
RIGHT
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
AnimatedLabel()
Constructs an AnimatedLabel with default base color,
default font extra size, and an empty text. |
|
AnimatedLabel(Color baseColor,
int fontExtraSize,
String text)
Constructs an AnimatedLabel with the given initial text
using a left oriented label. |
|
AnimatedLabel(Color baseColor,
int fontExtraSize,
String text,
int orientation)
Constructs an AnimatedLabel with the given initial text
and orientation. |
|
AnimatedLabel(Color baseColor,
int fontExtraSize,
String text,
int orientation,
int duration,
int frames_per_second)
Constructs an AnimatedLabel with the given properties. |
|
| Method Summary | |
|---|---|
long |
getDuration()
Returns the duration of the blend over animation. |
Color |
getForeground()
Returns the label's foreground base color. |
String |
getText()
Returns the text of the foreground label. |
boolean |
isAnimated()
Answers whether the animation is currently enabled. |
void |
setAnimated(boolean animated)
Enables or disables the blend over effect. |
void |
setDuration(long newDuration)
Sets the animation's duration and invalidates the animation cache. |
void |
setForeground(Color newForeground)
Sets a new foreground base color. |
void |
setText(String newText)
Sets a new text. |
void |
setTextImmediately(String newText)
Sets a new text without using the blend over animation. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTYNAME_ANIMATED
public static final String PROPERTYNAME_DURATION
public static final String PROPERTYNAME_FOREGROUND
public static final String PROPERTYNAME_TEXT
public static final int RIGHT
public static final int CENTER
public static final int LEFT
public static final Color DEFAULT_BASE_COLOR
public static final int DEFAULT_FONT_EXTRA_SIZE
| Constructor Detail |
|---|
public AnimatedLabel()
AnimatedLabel with default base color,
default font extra size, and an empty text.
public AnimatedLabel(Color baseColor,
int fontExtraSize,
String text)
AnimatedLabel with the given initial text
using a left oriented label.
baseColor - the color used as a basis for the text colorfontExtraSize - pixels that are added to the dialog font sizetext - the initial text to be displayed
public AnimatedLabel(Color baseColor,
int fontExtraSize,
String text,
int orientation)
AnimatedLabel with the given initial text
and orientation.
baseColor - the color used as a basis for the text colorfontExtraSize - pixels that are added to the dialog font sizetext - the initial text to be displayedorientation - the label's orientation
public AnimatedLabel(Color baseColor,
int fontExtraSize,
String text,
int orientation,
int duration,
int frames_per_second)
AnimatedLabel with the given properties.
baseColor - the color used as a basis for the text colorfontExtraSize - pixels that are added to the dialog font sizetext - the initial text to be displayedorientation - the label's orientationduration - the duration of the blend over animationframes_per_second - the blend over animation's frame rate| Method Detail |
|---|
public boolean isAnimated()
public long getDuration()
public Color getForeground()
getForeground in class Componentpublic String getText()
public void setAnimated(boolean animated)
animated - true to enable the blend over effect, false to disable itpublic void setDuration(long newDuration)
newDuration - the duration to be setpublic void setForeground(Color newForeground)
setForeground in class JComponentnewForeground - the color to be set as new foreground base colorpublic void setText(String newText)
newText - the new text to be displayedpublic void setTextImmediately(String newText)
newText - the text to be set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||