public class JESResources
extends java.lang.Object
Constructor and Description |
---|
JESResources() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
getFileFor(java.lang.String path)
Returns a File identifying a resource in the JES home directory,
and verifies that it exists.
|
static java.lang.String |
getHomePath()
Returns the configured JES home directory.
|
static java.lang.String |
getPathTo(java.lang.String path)
Returns the pathname for a resource in the JES home directory,
and verifies that it exists.
|
static javax.swing.ImageIcon |
makeIcon(java.lang.String path)
Returns a Swing ImageIcon using a particular resource in the JES
home directory.
|
static javax.swing.ImageIcon |
makeIcon(java.lang.String path,
java.lang.String description)
Returns a Swing ImageIcon using a particular resource in the JES
home directory.
|
public static java.lang.String getHomePath()
public static java.io.File getFileFor(java.lang.String path)
path
- The path to the resource, relative to the JES home,
without a leading /.java.lang.IllegalStateException
- If the JES home is not configured,
or the file is not installed.public static java.lang.String getPathTo(java.lang.String path)
path
- The path to the resource, relative to the JES home,
without a leading /.java.lang.IllegalStateException
- If the JES home is not configured,
or the file is not installed.public static javax.swing.ImageIcon makeIcon(java.lang.String path)
path
- The path to the resource, without a leading /.java.lang.IllegalStateException
- If the JES home is not configured,
or the file is not installed.public static javax.swing.ImageIcon makeIcon(java.lang.String path, java.lang.String description)
path
- The path to the resource, without a leading /.description
- A description for the icon.java.lang.IllegalStateException
- If the JES home is not configured,
or the file is not installed.