java.lang.Object
furbelow.AnimatedIcon
furbelow.AbstractAnimatedIcon
- All Implemented Interfaces:
Icon
- Direct Known Subclasses:
SpinningDial
Provide animation of auto-generated animations. Makes use of the repaint
tracking structure established by
AnimatedIcon.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractAnimatedIcon(int frameCount) protectedAbstractAnimatedIcon(int frameCount, int interval) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinalize()Ensure the timer stops running, so it, too can be GC'd.intgetFrame()Returns the current animation frame number.intReturns the total number of frames.intabstract intabstract intvoidAdvance to the next animation frame.protected abstract voidpaintFrame(Component c, Graphics g, int x, int y) Implement this method to paint the icon.protected voidregisterRepaintArea(Component c, int x, int y, int w, int h) Register repaint areas, which get get cleared once the repaint request has been queued.voidsetFrame(int f) Set the current animation frame number.voidsetFrameInterval(int interval) Setting a frame interval of zero stops automatic animation.Methods inherited from class furbelow.AnimatedIcon
isAnimated, paintIcon, repaint
-
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. -
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
Implement this method to paint the icon.- Overrides:
paintFramein classAnimatedIcon
-
getIconWidth
public abstract int getIconWidth()- Specified by:
getIconWidthin interfaceIcon- Overrides:
getIconWidthin classAnimatedIcon
-
getIconHeight
public abstract int getIconHeight()- Specified by:
getIconHeightin interfaceIcon- Overrides:
getIconHeightin classAnimatedIcon
-
registerRepaintArea
Description copied from class:AnimatedIconRegister repaint areas, which get get cleared once the repaint request has been queued.- Overrides:
registerRepaintAreain classAnimatedIcon
-