public abstract class AbstractAnimatedIcon extends AnimatedIcon
AnimatedIcon
.Modifier | Constructor and Description |
---|---|
protected |
AbstractAnimatedIcon() |
protected |
AbstractAnimatedIcon(int frameCount) |
protected |
AbstractAnimatedIcon(int frameCount,
int interval) |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Ensure the timer stops running, so it, too can be GC'd.
|
int |
getFrame()
Returns the current animation frame number.
|
int |
getFrameCount()
Returns the total number of frames.
|
int |
getFrameInterval() |
abstract int |
getIconHeight() |
abstract int |
getIconWidth() |
void |
nextFrame()
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.
|
isAnimated, paintIcon, repaint
protected AbstractAnimatedIcon()
protected AbstractAnimatedIcon(int frameCount)
protected AbstractAnimatedIcon(int frameCount, int interval)
protected void finalize()
public void setFrameInterval(int interval)
public int getFrameInterval()
public int getFrameCount()
public void nextFrame()
public void setFrame(int f)
public int getFrame()
protected abstract void paintFrame(Component c, Graphics g, int x, int y)
paintFrame
in class AnimatedIcon
public abstract int getIconWidth()
getIconWidth
in interface Icon
getIconWidth
in class AnimatedIcon
public abstract int getIconHeight()
getIconHeight
in interface Icon
getIconHeight
in class AnimatedIcon
protected void registerRepaintArea(Component c, int x, int y, int w, int h)
AnimatedIcon
registerRepaintArea
in class AnimatedIcon
Copyright © 2023. All rights reserved.