|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResourceLoader
Defines a set of methods used to load resources such as images, property files, and other types of files from the CLASSPATH. It provides a layer of abstraction so the application is not bound to a particular loading stategy. Note that a full ClassLoader could be used instead, but this is a little easier to code with.
| Field Summary | |
|---|---|
static String |
COMPONENT_ID
|
| Method Summary | |
|---|---|
ClassLoader |
getClassLoader()
Used to provide a custom class loader for certain cases. |
InputStream |
getResourceAsStream(String resourceName)
Opens and returns an input stream for the given resourceName. |
ImageIcon |
loadImage(String imageName)
Utility method that loads an image from the CLASSPATH. |
void |
setClassLoader(ClassLoader loader)
Used to provide a custom class loader for certain cases. |
| Field Detail |
|---|
static final String COMPONENT_ID
| Method Detail |
|---|
InputStream getResourceAsStream(String resourceName)
throws IOException
resourceName - the relative name of the resource to open
IOExceptionClassLoader getClassLoader()
ImageIcon loadImage(String imageName)
imageName - the subdirectory and name of image file (i.e.
images/edit16.gif )void setClassLoader(ClassLoader loader)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||