org.gjt.sp.jedit.gui
Class AnimatedIcon
java.lang.Object
javax.swing.ImageIcon
org.gjt.sp.jedit.gui.AnimatedIcon
- All Implemented Interfaces:
- Accessible, Icon, Serializable
- public class AnimatedIcon
- extends ImageIcon
A animated version of ImageIcon. It can be used anywhere an ImageIcon can be.
- See Also:
- Serialized Form
Methods inherited from class javax.swing.ImageIcon |
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString |
AnimatedIcon
public AnimatedIcon(Image icon,
Image[] frames,
int rate,
Component host)
- Parameters:
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 in
getFrames
public Image[] getFrames()
getIcon
public Image getIcon()
getRate
public int getRate()
setFrames
public void setFrames(Image[] frames)
setIcon
public void setIcon(Image icon)
setRate
public void setRate(int rate)
start
public void start()
- Starts the animation rolling
stop
public void stop()
- Stops the animation, and resets to frame 0