public class ShapeIcon
extends java.lang.Object
implements javax.swing.Icon
| Modifier and Type | Field and Description |
|---|---|
private java.awt.Color |
color |
private int |
height |
private java.awt.Shape |
shape |
private java.awt.Stroke |
stroke |
private int |
width |
| Constructor and Description |
|---|
ShapeIcon(java.awt.Shape shape,
java.awt.Stroke stroke,
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 final int width
private final int height
private final java.awt.Shape shape
private final java.awt.Stroke stroke
private final java.awt.Color color
public ShapeIcon(java.awt.Shape shape,
java.awt.Stroke stroke,
int width,
int height)
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Icon