public class ImageProxy extends java.lang.Object implements javax.swing.Icon
| Modifier and Type | Field and Description |
|---|---|
private javax.swing.ImageIcon |
image |
private java.lang.String |
name |
| Constructor and Description |
|---|
ImageProxy(java.lang.String name)
Constructs a proxy for delayed loading of an image file.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
ensureImageLoaded()
Loads the image if it hasn't been loaded yet.
|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
public ImageProxy(java.lang.String name)
name - the file namepublic void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Iconprivate void ensureImageLoaded()