public abstract class ScalableIcon extends Object implements ResizableIcon
| Constructor and Description |
|---|
ScalableIcon(int h,
int w)
Creates a new ScalableIcon.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getIconHeight()
Returns the icon's height.
|
int |
getIconWidth()
Returns the icon's width.
|
Image |
getImage(GraphicsConfiguration gc)
Gets the icon image.
|
void |
paintIcon(Component c,
Graphics graphics,
int x,
int y)
Draw the icon at the specified location.
|
abstract void |
paintImage(Graphics2D g,
int w,
int h)
Builds the image.
|
void |
setup(int w,
int h)
Resizes this icon.
|
public ScalableIcon(int h,
int w)
h - the icon height.w - the icon width.public int getIconHeight()
getIconHeight in interface Iconpublic int getIconWidth()
getIconWidth in interface Iconpublic Image getImage(GraphicsConfiguration gc)
gc - the graphics configuration for which the image will be
compatible.public void paintIcon(Component c, Graphics graphics, int x, int y)
public abstract void paintImage(Graphics2D g, int w, int h)
g - the graphics onto which the image should be painted.w - the image width.h - the image height.public void setup(int w,
int h)
setup in interface ResizableIconw - the new icon width.h - the new icon height.