com.bluemarsh.jswat
Class JSwat

java.lang.Object
  |
  +--com.bluemarsh.jswat.JSwat

public class JSwat
extends java.lang.Object

This class provides access to the localized resource bundle.

This class is a Singleton which means only one instance of this class exists. You use the instanceOf() method to access that instance.

Author:
Nathan Fiedler

Field Summary
protected static JSwat instance
          Reference to the single instance of this class.
protected  com.bluemarsh.config.JConfigure jConfigure
          Application configuration.
protected  java.util.ResourceBundle resources
          String and object resources for our program.
 
Constructor Summary
protected JSwat()
          No-arg constructor for JSwat class.
 
Method Summary
 com.bluemarsh.config.JConfigure getJConfigure()
          Returns a reference to the JConfigure object.
 java.net.URL getResource(java.lang.String key)
          Retrieves an object from the localized resource bundle.
 java.lang.String getResourceString(java.lang.String name)
          Retrieves a string from the localized resource bundle.
static JSwat instanceOf()
          Returns the reference to the single instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static JSwat instance
Reference to the single instance of this class.

resources

protected java.util.ResourceBundle resources
String and object resources for our program. Used to get localized strings and objects (such as images) for user interface components.

jConfigure

protected com.bluemarsh.config.JConfigure jConfigure
Application configuration.
Constructor Detail

JSwat

protected JSwat()
No-arg constructor for JSwat class. It is protected since this class is a singleton. To get the single instance of this class use the instanceOf() method.
Method Detail

getJConfigure

public com.bluemarsh.config.JConfigure getJConfigure()
Returns a reference to the JConfigure object.

getResourceString

public java.lang.String getResourceString(java.lang.String name)
Retrieves a string from the localized resource bundle. The resources are located in the appropriate resources/JSwat.properties file.
Parameters:
name - key name of the string resource to find
Returns:
string resource or null if not found
See Also:
getResource(java.lang.String)

getResource

public java.net.URL getResource(java.lang.String key)
Retrieves an object from the localized resource bundle. In most cases this is an image. The resources are located in the appropriate resources/JSwat.properties file.
Parameters:
key - key name of the resource to find
Returns:
URL pointing to the object resource
See Also:
getResourceString(java.lang.String)

instanceOf

public static JSwat instanceOf()
Returns the reference to the single instance of this class. If an instance does not exist it will be created.
Returns:
the instance of this class.