dsto.dfc.swt.icons
Class ImageDataIcon

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

public class ImageDataIcon
extends Object
implements Icon

An icon that is created from preloaded image data.

Author:
mpp
See Also:
ImageResourceIcon

Constructor Summary
ImageDataIcon(String name, org.eclipse.swt.graphics.ImageData data)
          Create a new instance.
 
Method Summary
 org.eclipse.swt.graphics.Image createImage()
           
 org.eclipse.swt.graphics.Image createImage(org.eclipse.swt.graphics.Device device)
           
 boolean equals(Object obj)
           
 int getIconHeight()
           
 int getIconWidth()
           
 org.eclipse.swt.graphics.Image getImage()
          Shortcut to get a cached version of the icon image.
 org.eclipse.swt.graphics.ImageData getImageData()
           
 int hashCode()
           
 void paintIcon(org.eclipse.swt.graphics.GC gc, int x, int y)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageDataIcon

public ImageDataIcon(String name,
                     org.eclipse.swt.graphics.ImageData data)
Create a new instance.

Parameters:
name - The image's logical name.
Method Detail

getImage

public org.eclipse.swt.graphics.Image getImage()
Shortcut to get a cached version of the icon image. The image is placed in the default IconCache.


createImage

public org.eclipse.swt.graphics.Image createImage()

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

paintIcon

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

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 Commonwealth of Australia