net.sf.jmp3renamer.gui
Class AnimatedIcon

java.lang.Object
  extended by javax.swing.ImageIcon
      extended by 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

Nested Class Summary
(package private) static class AnimatedIcon.Animator
           
 
Nested classes/interfaces inherited from class javax.swing.ImageIcon
ImageIcon.AccessibleImageIcon
 
Field Summary
private static AnimatedIcon.Animator animator
           
private static int current
           
private static int delay
           
private static Image[] frames
           
private static Component host
           
private static Image icon
           
private static AnimatedIcon instance
           
private static boolean running
           
 
Fields inherited from class javax.swing.ImageIcon
component, tracker
 
Constructor Summary
private AnimatedIcon(Image icon, Image[] frames, int rate, Component host)
           
 
Method Summary
static AnimatedIcon getInstance(Image img, Image[] frames, int rate, Component host)
           
 boolean isRunning()
           
static void setHost(Component host)
           
static void startAnimation()
          Starts the animation rolling
static void stopAnimation()
          Stops the animation, and resets to frame 0
 
Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

AnimatedIcon

private AnimatedIcon(Image icon,
                     Image[] frames,
                     int rate,
                     Component host)
Parameters:
frames - The frames to be used in the animation
rate - The frame rate of the animation, in frames per second
host - The container that the animation is used in
Method Detail

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()