org.jvnet.flamingo.common.icon
Class EmptyResizableIcon

java.lang.Object
  extended by org.jvnet.flamingo.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.

Author:
Kirill Grouchnikov

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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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