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 TypeMethodDescriptionintintvoidvoidvoidsetDimension(Dimension newDimension) Changes the dimension ofthisicon.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.EASTorSwingConstants.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.EASTorSwingConstants.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.EASTorSwingConstants.WEST.
-
-
Method Details
-
revertToOriginalDimension
public void revertToOriginalDimension() -
setDimension
Description copied from interface:ResizableIconChanges the dimension ofthisicon.- Specified by:
setDimensionin interfaceResizableIcon- Parameters:
newDimension- New dimension forthisicon.
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
toPaintEnabled
-
paintIcon
-