net.sf.jomic.tools
Class IconJAI
java.lang.Object
net.sf.jomic.tools.IconJAI
- All Implemented Interfaces:
- Icon
public class IconJAI
- extends Object
- implements Icon
Icon to display JAI image. This is based on the JAI Demo source code provided by sun, with the
following changes:
- fixed bug where an image without background color resulted in a class cast exception
because getProperty("background_color") was java.awt.Image.UndefinedProperty, but the code
tried to cast it to Color.
- removed useless imports
- improved some names (for example, "image" instead of "im")
- fixed a few CheckStyle issues
- changed all "protected" instance variables to "private"
- reformatted
- Author:
- Thomas Aglassinger (bugfixes and cleanup)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IconJAI
public IconJAI(RenderedImage newImage)
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight in interface Icon
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth in interface Icon
getImage
public RenderedImage getImage()
paintIcon
public void paintIcon(Component c,
Graphics g,
int x,
int y)
- Specified by:
paintIcon in interface Icon