com.digi.config.util
Class ConfigResource

java.lang.Object
  extended bycom.digi.config.util.ConfigResource

public class ConfigResource
extends java.lang.Object

This class provides static helper methods for accessing the various resource bundles available in the config system.


Field Summary
static java.lang.String DFT_HELP_TEXT_BUNDLE_NAME
           
static java.lang.String DFT_MSG_TEXT_BUNDLE_NAME
          The default resource files
static java.lang.String DFT_UI_IMAGE_BUNDLE_NAME
           
static java.lang.String DFT_UI_TEXT_BUNDLE_NAME
           
(package private)  java.util.Vector helpTextRbList
           
(package private)  java.util.Vector msgTextRbList
           
(package private) static ConfigResource theInstance
          Singleton reference
(package private)  java.util.Vector uiImageRbList
           
(package private)  java.util.Vector uiTextRbList
           
 
Constructor Summary
protected ConfigResource()
           
 
Method Summary
 void _loadHelpTextRb(java.lang.String bundleName)
          load the specified resource bundle and push it onto the help text resource stack.
 void _loadMsgTextRb(java.lang.String bundleName)
          load the specified resource bundle and push it onto the message text resource stack.
 void _loadUiImageRb(java.lang.String bundleName)
          load the specified resource bundle and push it onto the UI image resource stack.
 void _loadUiTextRb(java.lang.String bundleName)
          load the specified resource bundle and push it onto the UI text resource stack.
static java.lang.String getHelpRbString(java.lang.String key)
          Fetches a string from a help text resource bundle.
static javax.swing.ImageIcon getImageRbIcon(java.lang.String key)
          Fetches a image from a ui image resource bundle.
static ConfigResource getInstance()
          Singleton accessor method
static java.lang.String getMsgRbString(java.lang.String key)
          Fetches a string from a message text resource bundle.
static java.lang.String getMsgRbString(java.lang.String key, java.lang.Object[] replacementValues)
          Fetches a string from a message text resource bundle.
static java.lang.String getMsgRbStringForce(java.lang.String key)
          Fetches a string from a message text resource bundle.
static java.lang.String getUiRbString(java.lang.String key)
          Fetches a string from a ui text resource bundle.
static java.lang.String getUiRbString(java.lang.String key, java.lang.Object[] replacementValues)
          Fetches a string from a ui text resource bundle.
static void loadHelpTextRb(java.lang.String bundleName)
          load the specified resource bundle and push it onto the help text resource stack.
static void loadMsgTextRb(java.lang.String bundleName)
          load the specified resource bundle and push it onto the message text resource stack.
static void loadUiImageRb(java.lang.String bundleName)
          load the specified resource bundle and push it onto the UI image resource stack.
static void loadUiTextRb(java.lang.String bundleName)
          load the specified resource bundle and push it onto the UI text resource stack.
static void setImagesDirectory(java.lang.String directory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theInstance

static ConfigResource theInstance
Singleton reference


DFT_MSG_TEXT_BUNDLE_NAME

public static final java.lang.String DFT_MSG_TEXT_BUNDLE_NAME
The default resource files

See Also:
Constant Field Values

DFT_UI_TEXT_BUNDLE_NAME

public static final java.lang.String DFT_UI_TEXT_BUNDLE_NAME
See Also:
Constant Field Values

DFT_UI_IMAGE_BUNDLE_NAME

public static final java.lang.String DFT_UI_IMAGE_BUNDLE_NAME
See Also:
Constant Field Values

DFT_HELP_TEXT_BUNDLE_NAME

public static final java.lang.String DFT_HELP_TEXT_BUNDLE_NAME
See Also:
Constant Field Values

msgTextRbList

java.util.Vector msgTextRbList

uiTextRbList

java.util.Vector uiTextRbList

uiImageRbList

java.util.Vector uiImageRbList

helpTextRbList

java.util.Vector helpTextRbList
Constructor Detail

ConfigResource

protected ConfigResource()
Method Detail

getInstance

public static ConfigResource getInstance()
Singleton accessor method


setImagesDirectory

public static void setImagesDirectory(java.lang.String directory)

_loadMsgTextRb

public void _loadMsgTextRb(java.lang.String bundleName)
load the specified resource bundle and push it onto the message text resource stack.


_loadUiTextRb

public void _loadUiTextRb(java.lang.String bundleName)
load the specified resource bundle and push it onto the UI text resource stack.


_loadUiImageRb

public void _loadUiImageRb(java.lang.String bundleName)
load the specified resource bundle and push it onto the UI image resource stack.


_loadHelpTextRb

public void _loadHelpTextRb(java.lang.String bundleName)
load the specified resource bundle and push it onto the help text resource stack.


loadMsgTextRb

public static void loadMsgTextRb(java.lang.String bundleName)
load the specified resource bundle and push it onto the message text resource stack.


loadUiTextRb

public static void loadUiTextRb(java.lang.String bundleName)
load the specified resource bundle and push it onto the UI text resource stack.


loadUiImageRb

public static void loadUiImageRb(java.lang.String bundleName)
load the specified resource bundle and push it onto the UI image resource stack.


loadHelpTextRb

public static void loadHelpTextRb(java.lang.String bundleName)
load the specified resource bundle and push it onto the help text resource stack.


getMsgRbString

public static java.lang.String getMsgRbString(java.lang.String key)
Fetches a string from a message text resource bundle. Search the resource bundle stack from the top to the bottom until the message is found. Note: If the message is not located, then the key value is returned.

Parameters:
key - to use to get text from the resource bundle
Returns:
the requested message or the key if the text is missing

getMsgRbStringForce

public static java.lang.String getMsgRbStringForce(java.lang.String key)
                                            throws java.util.MissingResourceException
Fetches a string from a message text resource bundle. Search the resource bundle stack from the top to the bottom until the message is found. Note: If the message is not located, then a MissingResourceException is thrown

Parameters:
key - to use to get text from the resource bundle
Returns:
the requested message
Throws:
java.util.MissingResourceException

getMsgRbString

public static java.lang.String getMsgRbString(java.lang.String key,
                                              java.lang.Object[] replacementValues)
Fetches a string from a message text resource bundle. Search the resource bundle stack from the top to the bottom until the message is found. The messeage is then formatted with the supplied parameters. Note: If the message is not located, then the key value is returned.

Parameters:
key - to use to get text from the resource bundle
replacementValues - is an array of replacement values to insert into the message.
Returns:
the requested message or the key is the text is missing

getUiRbString

public static java.lang.String getUiRbString(java.lang.String key)
Fetches a string from a ui text resource bundle. Search the resource bundle stack from the top to the bottom until the message is found. Note: If the message is not located, then the key value is returned.

Parameters:
key - to use to get text from the resource bundle
Returns:
the requested message or the key if the text is missing

getUiRbString

public static java.lang.String getUiRbString(java.lang.String key,
                                             java.lang.Object[] replacementValues)
Fetches a string from a ui text resource bundle. Search the resource bundle stack from the top to the bottom until the message is found. The messeage is then formatted with the supplied parameters. Note: If the message is not located, then the key value is returned.

Parameters:
key - to use to get text from the resource bundle
replacementValues - is an array of replacement values to insert into the message.
Returns:
the requested message or the key is the text is missing

getImageRbIcon

public static javax.swing.ImageIcon getImageRbIcon(java.lang.String key)
Fetches a image from a ui image resource bundle. Search the resource bundle stack from the top to the bottom until the image is found. Note: If the image is not located, then the value null is returned.

Parameters:
key - to use to get text from the resource bundle
Returns:
the requested image or null if the image is not found

getHelpRbString

public static java.lang.String getHelpRbString(java.lang.String key)
Fetches a string from a help text resource bundle. Search the resource bundle stack from the top to the bottom until the message is found. Note: If the message is not located, then the key value is returned.

Parameters:
key - to use to get text from the resource bundle
Returns:
the requested message or the key if the text is missing


Copyright © 2001-2002 Digi International. All Rights Reserved.