Package org.ka2ddo.yaac.gui
Class IconLoader
java.lang.Object
org.ka2ddo.yaac.gui.IconLoader
This class provides static methods for loading icon images from the
distro's JAR file.
- Author:
- Andrew Pavlin, KA2DDO
-
Method Summary
Modifier and TypeMethodDescriptionstatic File
Get the root directory that relative-path image files will be located relative to.static BufferedImage
Read an image file into an Image object.static void
setBaseDir
(File dir) Set the root directory that image files will be located relative to.
-
Method Details
-
loadImage
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
Set the root directory that image files will be located relative to.- Parameters:
dir
- File specifying the base directory of the YAAC installation.
-
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.
-