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
ConstructorsModifierConstructorDescriptionprotected
protected
AbstractAnimatedIcon
(int frameCount) protected
AbstractAnimatedIcon
(int frameCount, int interval) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
finalize()
Ensure the timer stops running, so it, too can be GC'd.int
getFrame()
Returns the current animation frame number.int
Returns the total number of frames.int
abstract int
abstract int
void
Advance to the next animation frame.protected abstract void
paintFrame
(Component c, Graphics g, int x, int y) Implement this method to paint the icon.protected void
registerRepaintArea
(Component c, int x, int y, int w, int h) Register repaint areas, which get get cleared once the repaint request has been queued.void
setFrame
(int f) Set the current animation frame number.void
setFrameInterval
(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:
paintFrame
in classAnimatedIcon
-
getIconWidth
public abstract int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
- Overrides:
getIconWidth
in classAnimatedIcon
-
getIconHeight
public abstract int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
- Overrides:
getIconHeight
in classAnimatedIcon
-
registerRepaintArea
Description copied from class:AnimatedIcon
Register repaint areas, which get get cleared once the repaint request has been queued.- Overrides:
registerRepaintArea
in classAnimatedIcon
-