Constructor and Description |
---|
ResourcesImplementation(String bundleName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ImageIcon |
getImageIcon(String key)
Overloaded version of
getImageIcon(String, boolean)
which doesn't write out a waning if the resource is missing. |
ImageIcon |
getImageIcon(String key,
boolean warnIfMissing)
Use key to look up resource which names image URL.
|
String |
getString(String key)
Overloaded version of
getString(String, boolean) which
writes out a waning if the resource is missing. |
String |
getString(String key,
boolean warnIfMissing)
Use key to look up resource which names image URL.
|
String |
getStringFromFile(String key,
boolean warnIfMissing)
Use
key to identify a file by URL. |
void |
setErrorWriter(PrintWriter writer)
Set a writer to report warnings to.
|
public ResourcesImplementation(String bundleName)
bundleName
- Name of resource bundle. The package part of
the name is used to resolve the location of resources referred to
in the resource bundle.public void setErrorWriter(PrintWriter writer)
writer
- The writer.public String getString(String key)
getString(String, boolean)
which
writes out a waning if the resource is missing.public String getString(String key, boolean warnIfMissing)
public ImageIcon getImageIcon(String key)
getImageIcon(String, boolean)
which doesn't write out a waning if the resource is missing.getImageIcon
in interface Resources
key
- The resource key.public ImageIcon getImageIcon(String key, boolean warnIfMissing)
getImageIcon
in interface Resources
key
- The resource key.warnIfMissing
- true => write out an error message if the
resource is missing.public String getStringFromFile(String key, boolean warnIfMissing)
key
to identify a file by URL. Return contents
of file as a String.getStringFromFile
in interface Resources
key
- Resource key used to look up URL of file.warnIfMissing
- true => write out an error message if the
resource is missing.Copyright © 2000-2014. All Rights Reserved.