// Path: eu.hydrologis.stage.libs/src/eu/hydrologis/stage/libs/utilsrap/ImageUtil.java
// public class ImageUtil {
// 
//   public static Image getImage( Display display, String path ) {
//     ClassLoader classLoader = ImageUtil.class.getClassLoader();
//     InputStream inputStream = classLoader.getResourceAsStream( "resources/" + path );
//     Image result = null;
//     if( inputStream != null ) {
//       try {
//         result = new Image( display, inputStream );
//       } finally {
//         try {
//           inputStream.close();
//         } catch( IOException e ) {
//           // ignore
//         }
//       }
//     }
//     return result;
//   }
// 
//   private ImageUtil() {
//     // prevent instantiation
//   }
// 
// }


import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import eu.hydrologis.stage.libs.utilsrap.ImageUtil;
	/**
	 * Get an image for a certain key.
	 * 
	 * <p>
	 * <b>The only keys to be used are the static strings in this class!!</b>
	 * </p>
	 * 
	 * @param key
	 *            a file key, as for example {@link ImageCache#DATABASE_VIEW}.
	 * @return the image.
	 */
	public Image getImage(Display display, String key) {
		Image image = imageMap.get(key);
		if (image == null) {
			image = createImage(display, key);
			imageMap.put(key, image);
		}
		return image;
	}

	private Image createImage(Display display, String key) {
		Image image = ImageUtil.getImage(display, key);
		return image;
	}

	/**
	 * Disposes the images and clears the internal map.
	 */
	public void dispose() {
		Set<Entry<String, Image>> entrySet = imageMap.entrySet();
// Path: eu.hydrologis.stage.libs/src/eu/hydrologis/stage/libs/utilsrap/ImageUtil.java
// public class ImageUtil {
// 
//   public static Image getImage( Display display, String path ) {
//     ClassLoader classLoader = ImageUtil.class.getClassLoader();
//     InputStream inputStream = classLoader.getResourceAsStream( "resources/" + path );
//     Image result = null;
//     if( inputStream != null ) {
//       try {
//         result = new Image( display, inputStream );
//       } finally {
//         try {
//           inputStream.close();
//         } catch( IOException e ) {
//           // ignore
//         }
//       }
//     }
//     return result;
//   }
// 
//   private ImageUtil() {
//     // prevent instantiation
//   }
// 
// }


// Path: eu.hydrologis.stage.libs/src/eu/hydrologis/stage/libs/utils/ImageCache.java
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import eu.hydrologis.stage.libs.utilsrap.ImageUtil;

	/**
	 * Get an image for a certain key.
	 * 
	 * <p>
	 * <b>The only keys to be used are the static strings in this class!!</b>
	 * </p>
	 * 
	 * @param key
	 *            a file key, as for example {@link ImageCache#DATABASE_VIEW}.
	 * @return the image.
	 */
	public Image getImage(Display display, String key) {
		Image image = imageMap.get(key);
		if (image == null) {
			image = createImage(display, key);
			imageMap.put(key, image);
		}
		return image;
	}

	private Image createImage(Display display, String key) {
		Image image = ImageUtil.getImage(display, key);
		return image;
	}

	/**
	 * Disposes the images and clears the internal map.
	 */
	public void dispose() {
		Set<Entry<String, Image>> entrySet = imageMap.entrySet();
		for (Entry<String, Image> entry : entrySet) {