Class ImageCache

java.lang.Object
  extended by ImageCache

public class ImageCache
extends java.lang.Object

A class to hold images and insure they aren't pulled off the hard drive (or the internet) more than once


Field Summary
protected static ImageGetter imageMaster
           
 
Constructor Summary
ImageCache()
           
 
Method Summary
static java.awt.Image getIm(java.lang.String fileName)
          Gets the image described by the fileName.
static void setExtension(java.lang.String ex)
          Change the extension to add onto filenames
static void setImageGetter(ImageGetter _imageMaster)
          Set the ImageGetter so that we may start loading images
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageMaster

protected static ImageGetter imageMaster
Constructor Detail

ImageCache

public ImageCache()
Method Detail

getIm

public static java.awt.Image getIm(java.lang.String fileName)
Gets the image described by the fileName. If it isn't cached, we get it from file and add it to the cache.

Parameters:
fileName - the fileName of the image
Returns:
the Image

setImageGetter

public static void setImageGetter(ImageGetter _imageMaster)
Set the ImageGetter so that we may start loading images

Parameters:
_imageMaster - The ImageGetter

setExtension

public static void setExtension(java.lang.String ex)
Change the extension to add onto filenames

Parameters:
ex - the new extension