public class ShapeIcon extends java.lang.Object implements javax.swing.Icon
| Modifier and Type | Field and Description |
|---|---|
private int |
height |
private MoveableShape |
shape |
private int |
width |
| Constructor and Description |
|---|
ShapeIcon(MoveableShape shape,
int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
private int width
private int height
private MoveableShape shape
public ShapeIcon(MoveableShape shape, int width, int height)
public int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon in interface javax.swing.Icon