dsto.dfc.swing.icons
Class CompositeIcon

java.lang.Object
  extended by dsto.dfc.swing.icons.CompositeIcon
All Implemented Interfaces:
Icon

public class CompositeIcon
extends Object
implements Icon

A composite icon made by overlaying one icon over another.

Version:
$Revision$

Field Summary
protected  int alignment
           
static int BOTTOM_LEFT
           
static int BOTTOM_RIGHT
           
static int CENTER
           
protected  Icon icon1
           
protected  Icon icon2
           
static int MID_BOTTOM
           
static int MID_LEFT
           
static int MID_RIGHT
           
static int MID_TOP
           
static int TOP_LEFT
           
static int TOP_RIGHT
           
 
Constructor Summary
CompositeIcon(Icon icon1, Icon icon2, int alignment)
          Make an icon that consists of one icon overlayed on another.
 
Method Summary
 Icon getIcon1()
           
 Icon getIcon2()
           
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component c, Graphics g, int x, int y)
           
 void setIcon1(Icon newValue)
           
 void setIcon2(Icon newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOP_LEFT

public static final int TOP_LEFT
See Also:
Constant Field Values

MID_TOP

public static final int MID_TOP
See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
See Also:
Constant Field Values

MID_RIGHT

public static final int MID_RIGHT
See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
See Also:
Constant Field Values

MID_BOTTOM

public static final int MID_BOTTOM
See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
See Also:
Constant Field Values

MID_LEFT

public static final int MID_LEFT
See Also:
Constant Field Values

CENTER

public static final int CENTER
See Also:
Constant Field Values

icon1

protected Icon icon1

icon2

protected Icon icon2

alignment

protected int alignment
Constructor Detail

CompositeIcon

public CompositeIcon(Icon icon1,
                     Icon icon2,
                     int alignment)
Make an icon that consists of one icon overlayed on another.

Parameters:
icon1 - The lower icon.
icon2 - The upper icon.
alignment - The alignment of the lower icon relative to the upper. One of the TOP_LEFT, TOP_RIGHT, CENTER, etc constants.
Method Detail

getIcon1

public Icon getIcon1()

setIcon1

public void setIcon1(Icon newValue)

getIcon2

public Icon getIcon2()

setIcon2

public void setIcon2(Icon newValue)

paintIcon

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

getIconWidth

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

getIconHeight

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


Copyright © 2008 Commonwealth of Australia