speedscheduler
Class ImageUtils

java.lang.Object
  extended by speedscheduler.ImageUtils

public class ImageUtils
extends java.lang.Object

This class allows us to conveniently draw images on SWT widgets (like composites).


Constructor Summary
private ImageUtils()
          No instantiations.
 
Method Summary
static org.eclipse.swt.graphics.Image getImage(org.eclipse.swt.widgets.Display display, java.lang.Class classIn, java.lang.String location)
          Constructs and returns an Image object based on the specified Display object, Class that will use the image, and location of the image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageUtils

private ImageUtils()
No instantiations.

Method Detail

getImage

public static org.eclipse.swt.graphics.Image getImage(org.eclipse.swt.widgets.Display display,
                                                      java.lang.Class classIn,
                                                      java.lang.String location)
Constructs and returns an Image object based on the specified Display object, Class that will use the image, and location of the image.

Parameters:
display - The SWT Display
classIn - The class that will make use of the object (use this.getClass())
location - The URL of the image relative to the specified class, ie "images/clock.png". This may be inside a jar. That's okay, if it's in the same jar as the specified class.
Returns:
The Image object.