org.jogre.client.awt
Class GameImages

java.lang.Object
  extended byorg.jogre.client.awt.GameImages

public class GameImages
extends Object

Contains a list of images for a particular game. These images should work on both applications and applets.

Version:
Alpha 0.2.3
Author:
Bob Marks

Method Summary
static void addImage(String path, int imageSize)
          Method to add images.
 Object clone()
           
static void finishedLoaded()
          Set true that this class has finished loading.
static Image getImage(int index)
          Return a image from a specified index.
static ImageIcon getImageIcon(int index)
          Return an image icon from a specified index.
static GameImages getInstance()
          Return an instance of the GameImages class.
static boolean isFinishedLoading()
          Inform if the images have finished loading.
protected  ImageIcon loadImageFromJar(String imagePath, int imageSize)
          Load image from the jar file.
static void loadImages()
          Method to load the images (simply calls singleton constructor).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadImages

public static void loadImages()
Method to load the images (simply calls singleton constructor).


getInstance

public static GameImages getInstance()
Return an instance of the GameImages class.

Returns:

clone

public Object clone()
             throws CloneNotSupportedException
Throws:
CloneNotSupportedException

addImage

public static void addImage(String path,
                            int imageSize)
Method to add images.


loadImageFromJar

protected ImageIcon loadImageFromJar(String imagePath,
                                     int imageSize)
Load image from the jar file.

Returns:

getImage

public static Image getImage(int index)
Return a image from a specified index.

Parameters:
index - Index of image to return.
Returns:
Returns image or null if still loading images.

getImageIcon

public static ImageIcon getImageIcon(int index)
Return an image icon from a specified index.

Parameters:
index - Index of image to return.
Returns:
Returns image or null if still loading images.

isFinishedLoading

public static boolean isFinishedLoading()
Inform if the images have finished loading.

Returns:
Returns state of finishedLoading variable.

finishedLoaded

public static void finishedLoaded()
Set true that this class has finished loading.