|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--arlut.csd.Util.PackageResources
Utility class to provide resource-loading services. Methods in this class can load images and other resources from either CLASSPATH or a jar file, depending on how the program using this class is run.
| Field Summary | |
(package private) static java.applet.AppletContext |
context
|
(package private) static boolean |
debug
|
(package private) static boolean |
nevertryagain
|
| Constructor Summary | |
PackageResources()
|
|
| Method Summary | |
static java.awt.Image |
getImageResource(java.awt.Component comp,
java.lang.String imageName,
java.lang.Class refClass)
Loads an image by its filename from either CLASSPATH or a jar file, depending on how the code calling this method was run. |
static java.net.URL |
getPackageResource(java.lang.String strResource,
java.lang.Class refClass)
Loads a generic resource by its filename from either CLASSPATH or a jar file, depending on how the code calling this method was run. |
static void |
waitForImage(java.awt.Component component,
java.awt.Image image)
Helper method to handle the MediaTracker for image loading. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static java.applet.AppletContext context
static boolean nevertryagain
static final boolean debug
| Constructor Detail |
public PackageResources()
| Method Detail |
public static java.net.URL getPackageResource(java.lang.String strResource,
java.lang.Class refClass)
Loads a generic resource by its filename from either CLASSPATH or a jar file, depending on how the code calling this method was run.
strResource - Filename of resource to be loadedrefClass - Parent Class, used to find path to image
public static java.awt.Image getImageResource(java.awt.Component comp,
java.lang.String imageName,
java.lang.Class refClass)
Loads an image by its filename from either CLASSPATH or a jar file, depending on how the code calling this method was run.
comp - Parent component, used for Util.waitforimageimageName - Name of image to be loadedrefClass - Parent Class, used to find path to image
public static void waitForImage(java.awt.Component component,
java.awt.Image image)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||