Class ArrowResizableIcon
java.lang.Object
org.pushingpixels.flamingo.internal.utils.ArrowResizableIcon
- All Implemented Interfaces:
Icon
,ResizableIcon
- Direct Known Subclasses:
ArrowResizableIcon.CommandButtonPopupIcon
Helper implementation of
ResizableIcon
that draws an arrow.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionArrowResizableIcon
(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 TypeMethodDescriptionint
int
void
void
void
setDimension
(Dimension newDimension) Changes the dimension ofthis
icon.protected boolean
-
Field Details
-
width
protected int widthThe current icon width. -
height
protected int heightThe current icon height. -
direction
protected int directionArrow direction. One ofSwingConstants.SOUTH
,SwingConstants.NORTH
,SwingConstants.EAST
orSwingConstants.WEST
.
-
-
Constructor Details
-
ArrowResizableIcon
Creates a new arrow resizable icon.- Parameters:
initialDim
- Initial icon dimension.direction
- Arrow direction. Must be one ofSwingConstants.SOUTH
,SwingConstants.NORTH
,SwingConstants.EAST
orSwingConstants.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 ofSwingConstants.SOUTH
,SwingConstants.NORTH
,SwingConstants.EAST
orSwingConstants.WEST
.
-
-
Method Details
-
revertToOriginalDimension
public void revertToOriginalDimension() -
setDimension
Description copied from interface:ResizableIcon
Changes the dimension ofthis
icon.- Specified by:
setDimension
in interfaceResizableIcon
- Parameters:
newDimension
- New dimension forthis
icon.
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
-
toPaintEnabled
-
paintIcon
-