| |
|
| java.lang.Object com.jeta.open.resources.AppResourceLoader
AppResourceLoader | public class AppResourceLoader implements ResourceLoader(Code) | | This class is an implementation of a ResourceLoader. It insulates the
application code from having any need to know about the local file system
directory structure. It is also useful for debugging and development so we
can redirect resource request to debug files if needed.
author: Jeff Tassin |
AppResourceLoader | public AppResourceLoader()(Code) | | |
getClassLoader | public ClassLoader getClassLoader()(Code) | | a custom class loader for the application |
getEmptyIcon | public static ImageIcon getEmptyIcon()(Code) | | Returns an icon with a red X to show an icon that could not be loaded.
|
getImage | public static ImageIcon getImage(String imageName)(Code) | | Loads an image from disk. The image is loaded relative to the application
directory.
|
getResourceAsStream | public InputStream getResourceAsStream(String resourceName) throws IOException(Code) | | Opens and returns an input stream for the given resourceName. The
resourceName is relative to the application CLASSPATH (i.e. JAR file).
Parameters: resourceName - the relative name of the resource to open an input stream for the given resourceName. |
loadImage | public ImageIcon loadImage(String imageName)(Code) | | Helper utility to load an image file from the application images
directory
Parameters: imageName - the name (and optional sub directory ) of the file to load |
|
|
|