dsto.dfc.swt.icons
Class ImageDescriptorIcon

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

public class ImageDescriptorIcon
extends Object
implements Icon

Wraps a JFace ImageDesecriptor as an Icon. You may want to use ImageResourceIcon instead.

Author:
mpp

Constructor Summary
ImageDescriptorIcon(String resource)
           
 
Method Summary
 org.eclipse.swt.graphics.Image createImage()
           
 org.eclipse.swt.graphics.Image createImage(org.eclipse.swt.graphics.Device device)
           
 boolean equals(Object obj)
           
 org.eclipse.jface.resource.ImageDescriptor getDescriptor()
           
 int getIconHeight()
           
 int getIconWidth()
           
 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

ImageDescriptorIcon

public ImageDescriptorIcon(String resource)
Method Detail

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

getDescriptor

public org.eclipse.jface.resource.ImageDescriptor getDescriptor()

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