|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.quadrique.jbuildingblocks.gui.Resources
public class Resources
This class is used to manipulate the resources (e.g. configuration file, icon file, locale-specific objects...) of an application. The underlying implementation uses the application ClassLoader to retrieve the resources.
| Constructor Summary | |
|---|---|
Resources()
|
|
| Method Summary | |
|---|---|
void |
addResoucePath(String zPath)
|
ImageIcon |
getIcon(String zIconName)
This method builds an ImageIcon instance from the given image file name. |
static Resources |
getInstance()
This method returns the unique Resources class instance. |
URL |
getResource(String zResourceName)
This method builds an URL that points to a given resource (e.g an XSLT stylesheet file, a look and feel theme file, a configuration file...). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Resources()
| Method Detail |
|---|
public static final Resources getInstance()
public void addResoucePath(String zPath)
throws Exception
zPath -
Exceptionpublic ImageIcon getIcon(String zIconName)
zIconName - the name of the file (e.g. "resources/images/FileOpen.gif" if the file "FileOpen.gif" is stored
in the "resources/images" folder of the application jar archive). The file has to be either a .gif or a .jpg file.
public URL getResource(String zResourceName)
zResourceName - the name of the resource (e.g. "Transformation.xsl" if the file "Transformation.xsl" is stored
in the "com/.../resources/file" path has been added to this instance or the full path).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||