Class ImageControl

java.lang.Object
  extended by ImageControl

public class ImageControl
extends java.lang.Object

This class icludes methods for reading images from file


Constructor Summary
ImageControl()
           
 
Method Summary
static java.awt.image.BufferedImage getBufferedImage(java.awt.Image image, java.awt.Component c)
           
static java.awt.image.BufferedImage getBufferedImage(java.lang.String imageFile, java.awt.Component c)
          Reads a image from file, making it a buffered image.
static boolean waitForImage(java.awt.Image image, java.awt.Component c)
          Take an Image associated with a file, and wait until it is done loading (just a simple application of MediaTracker).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageControl

public ImageControl()
Method Detail

getBufferedImage

public static java.awt.image.BufferedImage getBufferedImage(java.lang.String imageFile,
                                                            java.awt.Component c)
Reads a image from file, making it a buffered image.

Parameters:
imagefile - the local file specifing the image
c - a graphical component to use
Returns:
the buffered image of the local file

getBufferedImage

public static java.awt.image.BufferedImage getBufferedImage(java.awt.Image image,
                                                            java.awt.Component c)

waitForImage

public static boolean waitForImage(java.awt.Image image,
                                   java.awt.Component c)
Take an Image associated with a file, and wait until it is done loading (just a simple application of MediaTracker). If you are loading multiple images, don't use this consecutive times; instead, use the version that takes an array of images.