Package furbelow

Class AbstractAnimatedIcon

java.lang.Object
furbelow.AnimatedIcon
furbelow.AbstractAnimatedIcon
All Implemented Interfaces:
Icon
Direct Known Subclasses:
SpinningDial

public abstract class AbstractAnimatedIcon extends AnimatedIcon
Provide animation of auto-generated animations. Makes use of the repaint tracking structure established by AnimatedIcon.
  • Constructor Details

    • AbstractAnimatedIcon

      protected AbstractAnimatedIcon()
    • AbstractAnimatedIcon

      protected AbstractAnimatedIcon(int frameCount)
    • AbstractAnimatedIcon

      protected AbstractAnimatedIcon(int frameCount, int interval)
  • Method Details

    • finalize

      protected void finalize()
      Ensure the timer stops running, so it, too can be GC'd.
      Overrides:
      finalize in class Object
    • setFrameInterval

      public void setFrameInterval(int interval)
      Setting a frame interval of zero stops automatic animation.
    • getFrameInterval

      public int getFrameInterval()
    • getFrameCount

      public int getFrameCount()
      Returns the total number of frames.
    • nextFrame

      public void nextFrame()
      Advance to the next animation frame.
    • setFrame

      public void setFrame(int f)
      Set the current animation frame number.
    • getFrame

      public int getFrame()
      Returns the current animation frame number.
    • paintFrame

      protected abstract void paintFrame(Component c, Graphics g, int x, int y)
      Implement this method to paint the icon.
      Overrides:
      paintFrame in class AnimatedIcon
    • getIconWidth

      public abstract int getIconWidth()
      Specified by:
      getIconWidth in interface Icon
      Overrides:
      getIconWidth in class AnimatedIcon
    • getIconHeight

      public abstract int getIconHeight()
      Specified by:
      getIconHeight in interface Icon
      Overrides:
      getIconHeight in class AnimatedIcon
    • registerRepaintArea

      protected void registerRepaintArea(Component c, int x, int y, int w, int h)
      Description copied from class: AnimatedIcon
      Register repaint areas, which get get cleared once the repaint request has been queued.
      Overrides:
      registerRepaintArea in class AnimatedIcon