org.springframework.richclient.image
Class EmptyIcon

java.lang.Object
  extended by org.springframework.richclient.image.EmptyIcon
All Implemented Interfaces:
Icon

public final class EmptyIcon
extends Object
implements Icon

A empty icon is a blank icon useful for ensuring alignment in menus between menuitems that have and do not have icons.

Author:
Keith Donald
See Also:
Icon

Field Summary
static EmptyIcon LARGE
          Convenience object for large icons, whose size matches the size of large icons in Sun's graphics repository.
static EmptyIcon SMALL
          Convenience object for small icons, whose size matches the size of small icons in Sun's graphics repository.
 
Constructor Summary
EmptyIcon(IconSize size)
          EmptyIcon objects are always square, having identical height and width.
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component c, Graphics g, int x, int y)
          This implementation is empty, and paints nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SMALL

public static final EmptyIcon SMALL
Convenience object for small icons, whose size matches the size of small icons in Sun's graphics repository.


LARGE

public static final EmptyIcon LARGE
Convenience object for large icons, whose size matches the size of large icons in Sun's graphics repository.

Constructor Detail

EmptyIcon

public EmptyIcon(IconSize size)
EmptyIcon objects are always square, having identical height and width.

Parameters:
size - The size of the empty icon. Icons are always equal on all sides.
Method Detail

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface Icon

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface Icon

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
This implementation is empty, and paints nothing.

Specified by:
paintIcon in interface Icon


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.