|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.util.Resources
public final class Resources
Resources provides a central class with methods for accessing project resources.
Field Summary | |
---|---|
static String |
CONFIG_PATH
Path to config files, within the resources area. |
static String |
CONFIG_SUBPATH
Subpath to config files, within the resources area. |
static String |
IMAGES_PATH
Path to images, within the resources area. |
static String |
IMAGES_SUBPATH
Subpath to images, within the resources area. |
static String |
RESOURCE_PATH
Base path to resources. |
Method Summary | |
---|---|
static Icon |
getIcon(String iconFileName)
Returns an Icon from the specified filename. |
static Properties |
getProperties(String fileName)
Loads an installed Properties file. |
static URL |
getResource(String resource)
Gets a URL associated with the given resource. |
static InputStream |
getResourceAsStream(String resource)
Gets a resource as an InputStream . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RESOURCE_PATH
public static final String IMAGES_SUBPATH
public static final String IMAGES_PATH
public static final String CONFIG_SUBPATH
public static final String CONFIG_PATH
Method Detail |
---|
public static URL getResource(String resource)
public static InputStream getResourceAsStream(String resource)
InputStream
.
public static Icon getIcon(String iconFileName)
iconFileName
- The relative path name to the image file.
For example, "flag.gif". It is assumed the image file is
being properly installed to the resources directory.
iconFileName
.
Even though the method interface can't guarentee this, the icon
implementation will be Serializable
.
Returns null (does not throw an Exception) if specified
resource is not found.public static Properties getProperties(String fileName) throws IOException
Properties
file.
fileName
- relative path to the configuration file (which must be
loadable by the java.util.Properties
class)
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |