org.jvnet.flamingo.utils
Class DoubleArrowResizableIcon

java.lang.Object
  extended by org.jvnet.flamingo.utils.DoubleArrowResizableIcon
All Implemented Interfaces:
javax.swing.Icon, ResizableIcon
Direct Known Subclasses:
DoubleArrowResizableIcon.CommandButtonPopupIcon

public class DoubleArrowResizableIcon
extends java.lang.Object
implements ResizableIcon

Helper implementation of ResizableIcon that draws a double arrow.

Author:
Kirill Grouchnikov

Nested Class Summary
static class DoubleArrowResizableIcon.CommandButtonPopupIcon
           
 
Constructor Summary
DoubleArrowResizableIcon(java.awt.Dimension initialDim, int direction)
          Creates a new double arrow resizable icon.
DoubleArrowResizableIcon(int initialDim, int direction)
          Creates a new double arrow resizable icon.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleArrowResizableIcon

public DoubleArrowResizableIcon(java.awt.Dimension initialDim,
                                int direction)
Creates a new double arrow resizable icon.

Parameters:
initialDim - Initial icon dimension.
direction - Arrow direction. Currently only SwingConstants.SOUTH is supported.

DoubleArrowResizableIcon

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

Parameters:
initialDim - Initial icon dimension.
direction - Arrow direction. Currently only SwingConstants.SOUTH is supported.
Method Detail

revertToOriginalDimension

public void revertToOriginalDimension()

setDimension

public void setDimension(java.awt.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 javax.swing.Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface javax.swing.Icon

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface javax.swing.Icon