public class AnimatedIcon
extends javax.swing.ImageIcon
Constructor and Description |
---|
AnimatedIcon(java.awt.Image icon,
java.awt.Image[] frames,
int rate,
java.awt.Component host) |
Modifier and Type | Method and Description |
---|---|
java.awt.Image[] |
getFrames() |
java.awt.Image |
getIcon() |
int |
getRate() |
void |
setFrames(java.awt.Image[] frames) |
void |
setIcon(java.awt.Image icon) |
void |
setRate(int rate) |
void |
start()
Starts the animation rolling
|
void |
stop()
Stops the animation, and resets to frame 0
|
public AnimatedIcon(java.awt.Image icon, java.awt.Image[] frames, int rate, java.awt.Component host)
frames
- The frames to be used in the animationrate
- The frame rate of the animation, in frames per secondhost
- The container that the animation is used inpublic java.awt.Image[] getFrames()
public java.awt.Image getIcon()
public int getRate()
public void setFrames(java.awt.Image[] frames)
public void setIcon(java.awt.Image icon)
public void setRate(int rate)
public void start()
public void stop()