org.openpermis.editor.policy.gui
Class CompoundIcon

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

public class CompoundIcon
extends Object
implements Icon

Icon that consists of two icons.

The compound icon draws two icons, the first at the bottom and the second on top of it.

Since:
0.3.0

Field Summary
private  int height
          Cache for the combined icon height.
private  Icon icon1
          The first icon to display.
private  Icon icon2
          The secound icon to display.
private  int width
          Cache for the combined icon width.
private  int x1
          Drawing x offset for the first icon.
private  int x2
          Drawing x offset for the second icon.
private  int y1
          Drawing y offset for the first icon.
private  int y2
          Drawing y offset for the second icon.
 
Constructor Summary
CompoundIcon(Icon icon1, Icon icon2)
          Creates a new annotated icon.
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component c, Graphics g, int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

private final int width
Cache for the combined icon width.

Since:
0.3.0

height

private final int height
Cache for the combined icon height.

Since:
0.3.0

icon1

private final Icon icon1
The first icon to display.

Since:
0.3.0

x1

private final int x1
Drawing x offset for the first icon.

Since:
0.3.0

y1

private final int y1
Drawing y offset for the first icon.

Since:
0.3.0

icon2

private final Icon icon2
The secound icon to display.

Since:
0.3.0

x2

private final int x2
Drawing x offset for the second icon.

Since:
0.3.0

y2

private final int y2
Drawing y offset for the second icon.

Since:
0.3.0
Constructor Detail

CompoundIcon

public CompoundIcon(Icon icon1,
                    Icon icon2)
Creates a new annotated icon.

Parameters:
icon1 - the first icon to display, must not be null.
icon2 - the second icon to display, must not be null.
Since:
0.3.0
Method Detail

getIconHeight

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

getIconWidth

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

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface Icon
Since:
0.3.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:48
Copyright (c) 2002-2007 Ergon Informatik AG