public class AnimatedIcon extends Object implements Icon
CellRendererPane
to render the icon. Keeps
a list of repaint rectangles to be used to queue repaint requests when
the animated icon indicates an update. The set of repaint rectangles
is cleared after the repaint requests are queued.Modifier | Constructor and Description |
---|---|
protected |
AnimatedIcon()
For use by derived classes that don't have an original.
|
|
AnimatedIcon(ImageIcon original)
Create an icon that takes care of animating itself on components
which use a CellRendererPane.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
static boolean |
isAnimated(Icon icon)
Returns whether the given icon is an animated GIF.
|
protected void |
paintFrame(Component c,
Graphics g,
int x,
int y) |
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
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.
|
protected void |
repaint()
Trigger a repaint on all components on which we've previously been
painted.
|
protected AnimatedIcon()
public AnimatedIcon(ImageIcon original)
public static boolean isAnimated(Icon icon)
protected void repaint()
public int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon
protected void registerRepaintArea(Component c, int x, int y, int w, int h)
Copyright © 2023. All rights reserved.