|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.swing.RenderedIcon
public class RenderedIcon
Pre-renders a wrapped icon to a BufferedImage to make future renders potentially faster. This is useful for wrapping composite and scaled icons.
Constructor Summary | |
---|---|
RenderedIcon()
Creates an empty icon. |
|
RenderedIcon(javax.swing.Icon icon)
Creates an icon that wraps the specified icon and renders it to a buffered image for future painting. |
Method Summary | |
---|---|
javax.swing.Icon |
getIcon()
Returns the wrapped icon. |
int |
getIconHeight()
|
int |
getIconWidth()
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Paints this icon, caching the internally wrapped icon in a buffered image if it has not been cached already. |
void |
setIcon(javax.swing.Icon icon)
Sets a new icon to this rendered icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RenderedIcon()
public RenderedIcon(javax.swing.Icon icon)
Method Detail |
---|
public void setIcon(javax.swing.Icon icon)
public javax.swing.Icon getIcon()
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |