public class DoubleArrowResizableIcon extends java.lang.Object implements ResizableIcon
ResizableIcon
that draws a double arrow.Modifier and Type | Field and Description |
---|---|
protected int |
direction
Arrow direction.
|
protected int |
height
The height of the rendered image.
|
protected int |
width
The width of the rendered image.
|
Constructor and Description |
---|
DoubleArrowResizableIcon(java.awt.Dimension initialDim,
int direction)
Creates a new double arrow resizable icon.
|
DoubleArrowResizableIcon(int initialDim,
int direction)
Creates a new double arrow resizable icon.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
void |
revertToOriginalDimension() |
void |
setDimension(java.awt.Dimension newDimension)
Changes the dimension of
this icon. |
protected boolean |
toPaintEnabled(java.awt.Component c) |
protected int width
protected int height
protected int direction
SwingConstants.SOUTH
,
SwingConstants.NORTH
, SwingConstants.EAST
or
SwingConstants.WEST
.public DoubleArrowResizableIcon(java.awt.Dimension initialDim, int direction)
initialDim
- Initial icon dimension.direction
- Arrow direction. Currently only SwingConstants.SOUTH
is supported.public DoubleArrowResizableIcon(int initialDim, int direction)
initialDim
- Initial icon dimension.direction
- Arrow direction. Currently only SwingConstants.SOUTH
is supported.public void revertToOriginalDimension()
public void setDimension(java.awt.Dimension newDimension)
ResizableIcon
this
icon.setDimension
in interface ResizableIcon
newDimension
- New dimension for this
icon.public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
protected boolean toPaintEnabled(java.awt.Component c)
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon