org.openpermis.editor.policy.gui
Class EmptyIcon

java.lang.Object
  extended by org.openpermis.editor.policy.gui.EmptyIcon
All Implemented Interfaces:
Serializable, Icon

public final class EmptyIcon
extends Object
implements Icon, Serializable

An icon that does not have any content.

Use icons of this type if you need an icon that has a specific size but does not render any content.

See Also:
Serialized Form
Since:
0.1.0

Field Summary
private  int height
          The height of this icon.
private static long serialVersionUID
           
private  int width
          The width of this icon.
 
Constructor Summary
private EmptyIcon(int width, int height)
          Creates an empty icon of the specified dimensions.
 
Method Summary
static Icon getIcon(int width, int height)
          Returns an empty icon of the specified size.
static Icon getIcon(String size)
          Returns an empty icon of the specified size.
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component component, Graphics graphics, int xCoord, int yCoord)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Constant Field Value:
-5944654665535461825L
Since:
0.1.0

width

private final int width
The width of this icon.

Since:
0.1.0

height

private final int height
The height of this icon.

Since:
0.1.0
Constructor Detail

EmptyIcon

private EmptyIcon(int width,
                  int height)
Creates an empty icon of the specified dimensions.

Parameters:
width - the width of the icon.
height - the height of the icon.
Since:
0.1.0
Method Detail

getIcon

public static final Icon getIcon(String size)
                          throws IllegalArgumentException
Returns an empty icon of the specified size.

Parameters:
size - the dimensions of the icons as string in form '[width]x[height]', for example 22x22.
Returns:
the icon requested.
Throws:
IllegalArgumentException - if the icon size specified cannot be parsed.
Since:
0.1.0

getIcon

public static final Icon getIcon(int width,
                                 int height)
Returns an empty icon of the specified size.

Parameters:
width - the width of the icon.
height - the height of the icon.
Returns:
the icon requested.
Since:
0.1.0

getIconHeight

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

getIconWidth

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

paintIcon

public void paintIcon(Component component,
                      Graphics graphics,
                      int xCoord,
                      int yCoord)
Specified by:
paintIcon in interface Icon
Since:
0.1.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:22
Copyright (c) 2002-2007 Ergon Informatik AG