public class PictureImageIcon extends Object implements Icon
| Constructor and Description |
|---|
PictureImageIcon(Picture picture,
boolean caching)
Constructs an icon with default transparency.
|
PictureImageIcon(Picture picture,
boolean caching,
int transparency)
Constructs an icon with specific transparency characteristics.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cacheImage(GraphicsConfiguration gc,
Color bg)
Forces creation of a cached image for display.
|
static BufferedImage |
createImage(Picture picture,
GraphicsConfiguration gc,
Color bg,
Integer transparency)
Creates an image containing the graphic content of this icon,
suitable for caching or painting to a graphics context.
|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
public PictureImageIcon(Picture picture, boolean caching, int transparency)
picture - picture to paintcaching - true iff painted image is cached rather than
just drawn off-screen every timetransparency - transparency modeTransparency.OPAQUE,
Transparency.BITMASK,
Transparency.TRANSLUCENTpublic PictureImageIcon(Picture picture, boolean caching)
picture - picture to paintcaching - true iff painted image is cached rather than
just drawn off-screen every timepublic int getIconWidth()
getIconWidth in interface Iconpublic int getIconHeight()
getIconHeight in interface Iconpublic void cacheImage(GraphicsConfiguration gc, Color bg)
gc - graphics config in which this icon will be displayedbg - background colour for image; null is legal but may
lead to unpredictable effects.public static BufferedImage createImage(Picture picture, GraphicsConfiguration gc, Color bg, Integer transparency)
picture - picture to paint on the imagegc - graphics config in which this icon will be displayedbg - background colour for image; null is legal but may
lead to unpredictable effects.transparency - integer value of Transparency code, or nullCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.