javax.swing.Icon, ResizableIconArrowResizableIcon.CommandButtonPopupIconpublic class ArrowResizableIcon extends java.lang.Object implements ResizableIcon
ResizableIcon that draws an arrow.| Modifier and Type | Class | Description |
|---|---|---|
static class |
ArrowResizableIcon.CommandButtonPopupIcon |
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
direction |
Arrow direction.
|
protected int |
height |
The current icon height.
|
protected int |
width |
The current icon width.
|
| Constructor | Description |
|---|---|
ArrowResizableIcon(int initialDim,
int direction) |
Creates a new arrow resizable icon.
|
ArrowResizableIcon(java.awt.Dimension initialDim,
int direction) |
Creates a new arrow resizable icon.
|
| Modifier and Type | Method | 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 ArrowResizableIcon(java.awt.Dimension initialDim,
int direction)
initialDim - Initial icon dimension.direction - Arrow direction. Must be one of SwingConstants.SOUTH,
SwingConstants.NORTH, SwingConstants.EAST or
SwingConstants.WEST.public ArrowResizableIcon(int initialDim,
int direction)
initialDim - Initial icon dimension.direction - Arrow direction. Must be one of SwingConstants.SOUTH,
SwingConstants.NORTH, SwingConstants.EAST or
SwingConstants.WEST.public void revertToOriginalDimension()
public void setDimension(java.awt.Dimension newDimension)
ResizableIconthis icon.setDimension in interface ResizableIconnewDimension - New dimension for this icon.public int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconprotected 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