Get Bounce at SourceForge.net. Fast secure and Free Open Source software downloads

org.bounce.image
Class ImageLoader

java.lang.Object
  extended by org.bounce.image.ImageLoader

public class ImageLoader
extends java.lang.Object

Loads Images from file and stores the images in a list for future reference.

Version:
$Revision: 1.6 $, $Date: 2008/01/28 21:28:37 $
Author:
Edwin Dankert

Constructor Summary
protected ImageLoader()
          Constructs the ImageLoader object.
 
Method Summary
static ImageLoader get()
          Returns the single reference to the ImageLoader.
 javax.swing.ImageIcon getImage(java.lang.String name)
          Gets an image for the string supplied.
 javax.swing.ImageIcon getImage(java.net.URL url)
          Gets an image for the url supplied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageLoader

protected ImageLoader()
Constructs the ImageLoader object.

Method Detail

get

public static ImageLoader get()
Returns the single reference to the ImageLoader.

Returns:
the ImageLoader singleton.

getImage

public javax.swing.ImageIcon getImage(java.lang.String name)
Gets an image for the string supplied. If the image cannot be found in the list of images already loaded, the image is loaded from the class path.

Parameters:
name - the name of the image.
Returns:
the image.

getImage

public javax.swing.ImageIcon getImage(java.net.URL url)
Gets an image for the url supplied. The image is only loaded from file if the image cannot be found in the list of images already loaded.

Parameters:
url - the url to the image.
Returns:
the image.

Get Bounce at SourceForge.net. Fast secure and Free Open Source software downloads

Copyright 2002-2002-2009 Edwin Dankert. All Rights Reserved.