public class IlvArrow extends Object implements Icon, SwingConstants
IlvArrow
implements an icon that is a triangular arrow pointing
in one of the four cardinal directions.BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor and Description |
---|
IlvArrow(int direction)
Creates a new arrow in the specified direction.
|
IlvArrow(int direction,
Color foreground,
Color background)
Creates a new arrow in the specified direction.
|
IlvArrow(int direction,
Color foreground,
Color background,
int size)
Creates a new arrow in the specified direction.
|
IlvArrow(int direction,
Color foreground,
Color background,
int width,
int height)
Creates a new arrow in the specified direction.
|
IlvArrow(int direction,
int size)
Creates a new arrow in the specified direction.
|
IlvArrow(int direction,
int width,
int height)
Creates a new arrow in the specified direction.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight()
Returns the icon's height.
|
int |
getIconWidth()
Returns the icon's width.
|
Insets |
getInsets()
Returns the icon insets.
|
boolean |
isTransparent()
Returns whether the icon is transparent.
|
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
Draws the arrow icon at the specified location.
|
protected void |
paintTriangle(Graphics g,
Color c,
int x,
int y,
int width,
int height)
Draws the triangular arrow using the specified color.
|
void |
setInsets(Insets insets)
Sets the icon insets.
|
void |
setTransparent(boolean transparent)
Sets whether the icon is transparent.
|
public IlvArrow(int direction)
rendered on
.direction
- The arrow direction, which must be one of the following
SwingConstants
: NORTH
, EAST
,
SOUTH
, or WEST
.public IlvArrow(int direction, Color foreground, Color background)
direction
- The arrow direction, which must be one of the following
SwingConstants
: NORTH
, EAST
,
SOUTH
, or WEST
.foreground
- The foreground color of the arrow.background
- The background color of the arrow.public IlvArrow(int direction, int size)
rendered on
.direction
- The arrow direction, which must be one of the following
SwingConstants
: NORTH
, EAST
,
SOUTH
, or WEST
.size
- The arrow width and height.public IlvArrow(int direction, Color foreground, Color background, int size)
direction
- The arrow direction, which must be one of the following
SwingConstants
: NORTH
, EAST
,
SOUTH
, or WEST
.foreground
- The foreground color of the arrow.background
- The background color of the arrow.size
- The arrow width and height.public IlvArrow(int direction, int width, int height)
rendered on
.direction
- The arrow direction, which must be one of the following
SwingConstants
: NORTH
, EAST
,
SOUTH
, or WEST
.width
- The arrow width.height
- The arrow height.public IlvArrow(int direction, Color foreground, Color background, int width, int height)
direction
- The arrow direction, which must be one of the following
SwingConstants
: NORTH
, EAST
,
SOUTH
, or WEST
.foreground
- The foreground color of the arrow.background
- The background color of the arrow.width
- The arrow width.height
- The arrow height.public void paintIcon(Component c, Graphics g, int x, int y)
protected void paintTriangle(Graphics g, Color c, int x, int y, int width, int height)
public final int getIconWidth()
getIconWidth
in interface Icon
public final int getIconHeight()
getIconHeight
in interface Icon
public final boolean isTransparent()
public final void setTransparent(boolean transparent)
public final Insets getInsets()
public final void setInsets(Insets insets)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.