public class IconUIResource extends java.lang.Object implements javax.swing.Icon, UIResource, java.io.Serializable
UIResource, which
indicates that it has been installed by a pluggable
LookAndFeel. Such icons are replaced when the LookAndFeel
changes.| Constructor and Description |
|---|
IconUIResource(javax.swing.Icon delegate)
Constructs a
IconUIResource that wraps another
icon. |
| Modifier and Type | Method and Description |
|---|---|
int |
getIconHeight()
Returns the height of the icon in pixels.
|
int |
getIconWidth()
Returns the width of the icon in pixels.
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Paints the icon by asking the delegate icon to paint itself.
|
public IconUIResource(javax.swing.Icon delegate)
IconUIResource that wraps another
icon. All messages are forwarded to the delegate icon.delegate - the icon that is wrapped by this
IconUIResource (null not permitted).public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon in interface javax.swing.Iconc - the Component whose icon is being painted. Some icons
use this argument to retrieve properties like the
background color.g - the graphics into which the icon will be painted.x - the horizontal position of the icon.y - the vertical position of the icon.public int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Icon