org.ka2ddo.yaac.gui
Class IconLoader

java.lang.Object
  extended by org.ka2ddo.yaac.gui.IconLoader

public class IconLoader
extends java.lang.Object

This class provides static methods for loading icon images from the distro's JAR file.


Field Summary
static java.lang.String SOURCEFILE
          Property name for path to source file for the loaded image.
 
Constructor Summary
IconLoader()
           
 
Method Summary
static java.io.File getBaseDir()
          Get the root directory that relative-path image files will be located relative to.
static java.awt.image.BufferedImage loadImage(java.lang.String filename)
          Read an image file into an Image object.
static void setBaseDir(java.io.File dir)
          Set the root directory that image files will be located relative to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCEFILE

public static final java.lang.String SOURCEFILE
Property name for path to source file for the loaded image.

See Also:
Constant Field Values
Constructor Detail

IconLoader

public IconLoader()
Method Detail

loadImage

public static java.awt.image.BufferedImage loadImage(java.lang.String filename)
Read an image file into an Image object.

Parameters:
filename - String pathname relative to root of YAAC distribution
Returns:
BufferedImage read from the file, or null if the image file does not exist

setBaseDir

public static void setBaseDir(java.io.File dir)
Set the root directory that image files will be located relative to.

Parameters:
dir - File specifying the base directory of the YAAC installation.

getBaseDir

public static java.io.File getBaseDir()
Get the root directory that relative-path image files will be located relative to.

Returns:
File specifying the base directory of the YAAC installation.