org.pushingpixels.flamingo.api.common.icon
Class EmptyResizableIcon

java.lang.Object
  extended by org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon
All Implemented Interfaces:
javax.swing.Icon, ResizableIcon

public class EmptyResizableIcon
extends java.lang.Object
implements ResizableIcon

Implementation of ResizableIcon that paints nothing.


Field Summary
protected  int height
          The current icon height.
protected  int width
          The current icon width.
 
Constructor Summary
EmptyResizableIcon(java.awt.Dimension initialDim)
          Creates a new empty resizable icon of the specified size.
EmptyResizableIcon(int initialDim)
          Creates a new empty resizable icon of the specified size.
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
           
 void setDimension(java.awt.Dimension newDimension)
          Changes the dimension of this icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

protected int width
The current icon width.


height

protected int height
The current icon height.

Constructor Detail

EmptyResizableIcon

public EmptyResizableIcon(java.awt.Dimension initialDim)
Creates a new empty resizable icon of the specified size.

Parameters:
initialDim - Initial dimension of the icon.

EmptyResizableIcon

public EmptyResizableIcon(int initialDim)
Creates a new empty resizable icon of the specified size.

Parameters:
initialDim - Initial dimension of the icon.
Method Detail

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