com.miginfocom.util.gfx
Class ScaleableImage
java.lang.Object
com.miginfocom.util.gfx.ScaleableImage
- All Implemented Interfaces:
- java.awt.Transparency, javax.swing.Icon
- Direct Known Subclasses:
- IconPainter, SlicedImage, XtdImage
public abstract class ScaleableImage
- extends java.lang.Object
- implements javax.swing.Icon, java.awt.Transparency
An image (icon) that can be scaled as well.
Fields inherited from interface java.awt.Transparency |
BITMASK, OPAQUE, TRANSLUCENT |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.Icon |
getIconHeight, getIconWidth, paintIcon |
Methods inherited from interface java.awt.Transparency |
getTransparency |
ScaleableImage
public ScaleableImage()
drawImage
public void drawImage(java.awt.Graphics2D g,
java.awt.Rectangle r)
- Transfer to
drawImage(java.awt.Graphics2D, int, int, int, int)
- Parameters:
g
- The object to draw inr
- The rectangle to draw in.
drawImage
public abstract void drawImage(java.awt.Graphics2D g,
int x,
int y,
int width,
int height)
- Paints the internal buffered image (is loaded yet) scaled into the rectangle. One cached image will be retained
and used if the same width/height is used again. If the image hasn't been loaded yet nothing is drawn.
- Parameters:
g
- The Graphics object to draw inx
- Upper left corner.y
- Upper left corner.width
- The width. If -1 the image's width is used.height
- The height. If -1 the image's height is used.- See Also:
Icon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
Copyright © 2009 MiG InfoCom AB. All Rights Reserved.