Ontimize 5.2072EN

com.ontimize.cache
Class ImageRepository

java.lang.Object
  extended bycom.ontimize.cache.ImageRepository

public class ImageRepository
extends java.lang.Object


Field Summary
static int ABORTED
           
static int COMPLETE
           
protected static java.awt.Component component
           
static boolean DEBUG
           
static int ERRORED
           
protected static java.util.Hashtable ids
           
protected static java.util.Hashtable images
           
static int LOADING
           
protected static java.awt.MediaTracker tracker
           
 
Constructor Summary
ImageRepository()
           
 
Method Summary
static java.awt.Image getImage(java.net.URL imageURL)
          Gets an image loading it from the specified URL.
static java.awt.Image getImage(java.net.URL imageURL, java.awt.image.ImageObserver observer)
           
static java.awt.Image getImageAndWait(java.net.URL imageURL)
          Gets an image loading it from the specified URL.
static int getLoadingState(java.net.URL imageURL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG

component

protected static final java.awt.Component component

images

protected static java.util.Hashtable images

tracker

protected static java.awt.MediaTracker tracker

ids

protected static java.util.Hashtable ids

COMPLETE

public static int COMPLETE

ERRORED

public static int ERRORED

ABORTED

public static int ABORTED

LOADING

public static int LOADING
Constructor Detail

ImageRepository

public ImageRepository()
Method Detail

getImage

public static java.awt.Image getImage(java.net.URL imageURL)
Gets an image loading it from the specified URL. If the image is loaded yet returns it, other case start the image load.
This is a useful method in combination with ImageObserver

Parameters:
imageURL -
Returns:

getImage

public static java.awt.Image getImage(java.net.URL imageURL,
                                      java.awt.image.ImageObserver observer)

getImageAndWait

public static java.awt.Image getImageAndWait(java.net.URL imageURL)
Gets an image loading it from the specified URL. This method waits until the image is loaded. If the image is yet loaded returns it.

Parameters:
imageURL -
Returns:

getLoadingState

public static int getLoadingState(java.net.URL imageURL)

Ontimize