Package org.pushingpixels.flamingo.internal.utils

# Class ArrowResizableIcon

java.lang.Object
org.pushingpixels.flamingo.internal.utils.ArrowResizableIcon

All Implemented Interfaces:
  `Icon`, `ResizableIcon`

Direct Known Subclasses:
  `ArrowResizableIcon.CommandButtonPopupIcon`

public class ArrowResizableIcon extends Object implements ResizableIcon
Helper implementation of `ResizableIcon` that draws an arrow.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`ArrowResizableIcon.CommandButtonPopupIcon`

## Field Summary

Fields
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 Summary

Constructors
Constructor
Description
`ArrowResizableIcon(int initialDim, int direction)`
Creates a new arrow resizable icon.
`ArrowResizableIcon(Dimension initialDim, int direction)`
Creates a new arrow resizable icon.

## Method Summary

Modifier and Type
Method
Description
`int`
`getIconHeight()`
`int`
`getIconWidth()`
`void`
`paintIcon(Component c, Graphics g, int x, int y)`
`void`
`revertToOriginalDimension()`
`void`
`setDimension(Dimension newDimension)`
Changes the dimension of `this` icon.
`protected boolean`
`toPaintEnabled(Component c)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### width

protected int width
The current icon width.

### height

protected int height
The current icon height.

### direction

protected int direction
Arrow direction. One of `SwingConstants.SOUTH`, `SwingConstants.NORTH`, `SwingConstants.EAST` or `SwingConstants.WEST`.

## Constructor Details

### ArrowResizableIcon

public ArrowResizableIcon(Dimension initialDim, int direction)
Creates a new arrow resizable icon.

Parameters:
  `initialDim` - Initial icon dimension.
  `direction` - Arrow direction. Must be one of `SwingConstants.SOUTH`, `SwingConstants.NORTH`, `SwingConstants.EAST` or `SwingConstants.WEST`.

### ArrowResizableIcon

public ArrowResizableIcon(int initialDim, int direction)
Creates a new arrow resizable icon.

Parameters:
  `initialDim` - Initial icon dimension.
  `direction` - Arrow direction. Must be one of `SwingConstants.SOUTH`, `SwingConstants.NORTH`, `SwingConstants.EAST` or `SwingConstants.WEST`.

## Method Details

### revertToOriginalDimension

public void revertToOriginalDimension()

### setDimension

public void setDimension(Dimension newDimension)
Description copied from interface: `ResizableIcon`
Changes the dimension of `this` icon.

Specified by:
  `setDimension` in interface `ResizableIcon`
Parameters:
  `newDimension` - New dimension for `this` icon.

### getIconHeight

public int getIconHeight()

Specified by:
  `getIconHeight` in interface `Icon`

### getIconWidth

public int getIconWidth()

Specified by:
  `getIconWidth` in interface `Icon`

### toPaintEnabled

protected boolean toPaintEnabled(Component c)

### paintIcon

public void paintIcon(Component c, Graphics g, int x, int y)

Specified by:
  `paintIcon` in interface `Icon`