public class ArrowIcon extends Object implements Icon
Icon
showing an arrow with a specifiable direction
and size. For example you can use it as the Icon for a start button of
a timer.SquareIcon
Constructor and Description |
---|
ArrowIcon(int direction)
Creates a new ArrowIcon with the specified direction and
the default size of 8 pixels.
|
ArrowIcon(int direction,
int iconSize)
Creates a new ArrowIcon with the specified direction and
size.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight()
Returns the specified or default size depending on the chosen constructor.
|
int |
getIconWidth()
Returns the specified or default size depending on the chosen constructor.
|
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 ArrowIcon(int direction)
SwingConstants
final fields:
SwingConstants.WEST
SwingConstants.EAST
SwingConstants.NORTH
SwingConstants.SOUTH
public ArrowIcon(int direction, int iconSize)
SwingConstants
final fields:
SwingConstants.WEST
SwingConstants.EAST
SwingConstants.NORTH
SwingConstants.SOUTH
public int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon