public class SquareIcon extends Object implements Icon
Icon
showing a square. For example you can use it as the
Icon for a stop button of a timer.
The size of the Icon is not the size of the actual square the Icon is showing. The square size fits to the arrow size of an ArrowIcon object.
ArrowIcon
Constructor and Description |
---|
SquareIcon()
Creates a new SquareIcon with
the default size of 8 pixels.
|
SquareIcon(int iconSize)
Creates a new SquareIcon with the specified
size.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
void |
paintTriangle(Graphics g,
int x,
int y,
int size,
boolean isEnabled,
Color foreground) |
public SquareIcon()
public SquareIcon(int iconSize)
public int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon