|
||||||||||
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 |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
CENTER
|
static java.awt.Color |
DEFAULT_BASE_COLOR
|
static int |
DEFAULT_FONT_EXTRA_SIZE
|
static int |
LEFT
|
static java.lang.String |
PROPERTYNAME_ANIMATED
|
static java.lang.String |
PROPERTYNAME_DURATION
|
static java.lang.String |
PROPERTYNAME_FOREGROUND
|
static java.lang.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(java.awt.Color baseColor,
int fontExtraSize,
java.lang.String text)
Constructs an AnimatedLabel with the given initial text
using a left oriented label. |
|
AnimatedLabel(java.awt.Color baseColor,
int fontExtraSize,
java.lang.String text,
int orientation)
Constructs an AnimatedLabel with the given initial text
and orientation. |
|
AnimatedLabel(java.awt.Color baseColor,
int fontExtraSize,
java.lang.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. |
java.awt.Color |
getForeground()
Returns the label's foreground base color. |
java.lang.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(java.awt.Color newForeground)
Sets a new foreground base color. |
void |
setText(java.lang.String newText)
Sets a new text. |
void |
setTextImmediately(java.lang.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 javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTYNAME_ANIMATED
public static final java.lang.String PROPERTYNAME_DURATION
public static final java.lang.String PROPERTYNAME_FOREGROUND
public static final java.lang.String PROPERTYNAME_TEXT
public static final int RIGHT
public static final int CENTER
public static final int LEFT
public static final java.awt.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(java.awt.Color baseColor, int fontExtraSize, java.lang.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 displayedpublic AnimatedLabel(java.awt.Color baseColor, int fontExtraSize, java.lang.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 orientationpublic AnimatedLabel(java.awt.Color baseColor, int fontExtraSize, java.lang.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 rateMethod Detail |
---|
public boolean isAnimated()
public long getDuration()
public java.awt.Color getForeground()
getForeground
in class java.awt.Component
public java.lang.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(java.awt.Color newForeground)
setForeground
in class javax.swing.JComponent
newForeground
- the color to be set as new foreground base colorpublic void setText(java.lang.String newText)
newText
- the new text to be displayedpublic void setTextImmediately(java.lang.String newText)
newText
- the text to be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |