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 ofResizableIcon
that draws an arrow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArrowResizableIcon.CommandButtonPopupIcon
-
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
All Methods Instance Methods Concrete Methods 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 ofthis
icon.protected boolean
toPaintEnabled(Component c)
-
-
-
Field Detail
-
width
protected int width
The current icon width.
-
height
protected int height
The current icon height.
-
direction
protected int direction
Arrow direction. One ofSwingConstants.SOUTH
,SwingConstants.NORTH
,SwingConstants.EAST
orSwingConstants.WEST
.
-
-
Constructor Detail
-
ArrowResizableIcon
public ArrowResizableIcon(Dimension 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
.
-
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 Detail
-
revertToOriginalDimension
public void revertToOriginalDimension()
-
setDimension
public void setDimension(Dimension newDimension)
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
protected boolean toPaintEnabled(Component c)
-
-