csheets.ui
Class BlankIcon

java.lang.Object
  extended by csheets.ui.BlankIcon
All Implemented Interfaces:
Icon

public final class BlankIcon
extends Object
implements Icon

A blank icon used to indent menu items.

Author:
Einar Pehrson

Constructor Summary
BlankIcon(int size)
          Creates a new blank icon with the given size.
BlankIcon(int width, int height)
          Creates a new blank icon with the given width and height.
 
Method Summary
 int getIconHeight()
          Returns the height of the icon.
 int getIconWidth()
          Returns the width of the icon.
 void paintIcon(Component c, Graphics g, int x, int y)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlankIcon

public BlankIcon(int size)
Creates a new blank icon with the given size.

Parameters:
size - the size of the icon (used as width and height)

BlankIcon

public BlankIcon(int width,
                 int height)
Creates a new blank icon with the given width and height.

Parameters:
width - the width of the icon
height - the height of the icon
Method Detail

getIconWidth

public int getIconWidth()
Returns the width of the icon.

Specified by:
getIconWidth in interface Icon
Returns:
the width of the icon.

getIconHeight

public int getIconHeight()
Returns the height of the icon.

Specified by:
getIconHeight in interface Icon
Returns:
the height of the icon.

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Does nothing.

Specified by:
paintIcon in interface Icon