net.sf.jmp3renamer.gui
Class AnimatedIcon
java.lang.Object
javax.swing.ImageIcon
net.sf.jmp3renamer.gui.AnimatedIcon
- All Implemented Interfaces:
- Serializable, Accessible, Icon
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 |
animator
private static AnimatedIcon.Animator animator
frames
private static Image[] frames
current
private static int current
delay
private static int delay
host
private static Component host
icon
private static Image icon
instance
private static AnimatedIcon instance
running
private static boolean running
AnimatedIcon
private 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
getInstance
public static AnimatedIcon getInstance(Image img,
Image[] frames,
int rate,
Component host)
setHost
public static void setHost(Component host)
startAnimation
public static void startAnimation()
- Starts the animation rolling
stopAnimation
public static void stopAnimation()
- Stops the animation, and resets to frame 0
isRunning
public boolean isRunning()