dsto.dfc.swt.icons
Class StackIcon

java.lang.Object
  extended by dsto.dfc.swt.icons.StackIcon
All Implemented Interfaces:
Icon

public class StackIcon
extends Object
implements Icon

An icon that stacks one icon on another.


Field Summary
protected  int alignment
           
static int BOTTOM_LEFT
           
static int BOTTOM_RIGHT
           
static int CENTER
           
protected  org.eclipse.swt.graphics.ImageData imageData
           
protected  Icon lowerIcon
           
static int MID_BOTTOM
           
static int MID_LEFT
           
static int MID_RIGHT
           
static int MID_TOP
           
static int TOP_LEFT
           
static int TOP_RIGHT
           
protected  Icon upperIcon
           
 
Constructor Summary
StackIcon(Icon lowerIcon, Icon upperIcon)
          Make an icon that consists of one icon overlayed on another.
StackIcon(Icon lowerIcon, Icon upperIcon, int alignment)
          Make an icon that consists of one icon overlayed on another.
 
Method Summary
 org.eclipse.swt.graphics.Image createImage(org.eclipse.swt.graphics.Device device)
           
 boolean equals(Object obj)
           
 boolean equals(StackIcon icon)
           
 int getIconHeight()
           
 int getIconWidth()
           
 org.eclipse.swt.graphics.ImageData getImageData()
           
 Icon getLowerIcon()
           
 Icon getUpperIcon()
           
 int hashCode()
           
 void paintIcon(org.eclipse.swt.graphics.GC gc, int x, int y)
           
 void setLowerIcon(Icon newValue)
           
 void setUpperIcon(Icon newValue)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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

lowerIcon

protected Icon lowerIcon

upperIcon

protected Icon upperIcon

alignment

protected int alignment

imageData

protected org.eclipse.swt.graphics.ImageData imageData
Constructor Detail

StackIcon

public StackIcon(Icon lowerIcon,
                 Icon upperIcon)
Make an icon that consists of one icon overlayed on another. The upper icon is displayed centered on the lower.

Parameters:
lowerIcon - The lower icon.
upperIcon - The upper icon.

StackIcon

public StackIcon(Icon lowerIcon,
                 Icon upperIcon,
                 int alignment)
Make an icon that consists of one icon overlayed on another.

Parameters:
lowerIcon - The lower icon.
upperIcon - 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

getLowerIcon

public Icon getLowerIcon()

setLowerIcon

public void setLowerIcon(Icon newValue)

getUpperIcon

public Icon getUpperIcon()

setUpperIcon

public void setUpperIcon(Icon newValue)

paintIcon

public void paintIcon(org.eclipse.swt.graphics.GC gc,
                      int x,
                      int y)
Specified by:
paintIcon in interface Icon

createImage

public org.eclipse.swt.graphics.Image createImage(org.eclipse.swt.graphics.Device device)
Specified by:
createImage in interface Icon

getImageData

public org.eclipse.swt.graphics.ImageData getImageData()
Specified by:
getImageData in interface Icon

getIconWidth

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

getIconHeight

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

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

equals

public boolean equals(StackIcon icon)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 Commonwealth of Australia