|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.wordpress.tipsforjava.swing.AnimatedIcon
com.wordpress.tipsforjava.swing.CircularAnimatedIcon
public class CircularAnimatedIcon extends AnimatedIcon
The CircularAnimatedIcon will display a series of Icons in a circular sequence. That is, the cycle will be completed when the Icons have been displayed from first to last and then back down to the first again.
| Field Summary | |
|---|---|
private int |
direction
|
| Fields inherited from class AnimatedIcon | |
|---|---|
| BOTTOM, CENTER, DEFAULT_CYCLES, DEFAULT_DELAY, LEFT, RIGHT, TOP, alignmentX, alignmentY, animationFinished, component, currentIconIndex, cycles, cyclesCompleted, iconHeight, iconWidth, iconX, iconY, icons, showFirstIcon, timer |
| Constructor Summary | |
CircularAnimatedIcon(JComponent component, Icon... icons)
Create a CircularAnimatedIcon that will continuously cycle with the default delay (500ms). |
|
CircularAnimatedIcon(JComponent component, int delay, Icon... icons)
Create an CircularAnimatedIcon that will continuously cycle |
|
CircularAnimatedIcon(JComponent component, int delay, int cycles, Icon... icons)
Create an CircularAnimatedIcon specifying all the properties. |
|
| Method Summary | |
|---|---|
protected int
|
getNextIconIndex(int currentIndex, int iconCount)
Get the index of the next Icon to be displayed. |
protected boolean
|
isCycleCompleted(int currentIndex, int iconCount)
This implemention checks if the first icon is currently displayed. |
| Methods inherited from class AnimatedIcon | |
|---|---|
| actionPerformed, addIcon, calculateIconDimensions, getAlignmentX, getAlignmentY, getComponent, getCurrentIconIndex, getCycles, getDelay, getIcon, getIconCount, getIconHeight, getIconWidth, getNextIconIndex, getOffset, isCycleCompleted, isShowFirstIcon, paintIcon, pause, restart, run, setAlignmentX, setAlignmentY, setCurrentIconIndex, setCycles, setDelay, setShowFirstIcon, start, stop |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private int direction
| Constructor Detail |
|---|
public CircularAnimatedIcon(JComponent component, Icon... icons)
component - the component the icon will be painted onicons - the Icons to be painted as part of the animation
public CircularAnimatedIcon(JComponent component, int delay, Icon... icons)
component - the component the icon will be painted ondelay - the delay between painting each icon, in milli secondsicons - the Icons to be painted as part of the animation
public CircularAnimatedIcon(JComponent component, int delay, int cycles, Icon... icons)
component - the component the icon will be painted ondelay - the delay between painting each icon, in milli secondscycles - the number of times to repeat the animation sequenceicons - the Icons to be painted as part of the animation
| Method Detail |
|---|
protected int getNextIconIndex(int currentIndex, int iconCount)
index - the index of the Icon currently displayediconCount - the number of Icons to be displayed
protected boolean isCycleCompleted(int currentIndex, int iconCount)
index - the index of the Icon currently displayediconCount - the number of Icons to be displayed
Groovy Documentation