FileDocCategorySizeDatePackage
I18N2.javaAPI DocExample1853Sun Dec 14 22:47:38 GMT 2003oreilly.hcj.constants

I18N2

public final class I18N2 extends Object
A class to provide internationalization strings.
author
Robert (Kraythe) Simmons jr.

Fields Summary
public static final String
OK
Holds the string for the key OK.
public static final String
CANCEL
Holds the string for the key OK.
public static final String
REFRESH
Holds the string for the key OK.
Constructors Summary
private I18N2()
Blocks creation of an I18N2 object.

		final String BUNDLE_NAME = "oreilly/hcj/constants/I18N";
		final ResourceBundle BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);

		// --
		OK = getString(BUNDLE, "OK");
		CANCEL = getString(BUNDLE, "CANCEL");
		REFRESH = getString(BUNDLE, "REFRESH");
	
	
Methods Summary
private static java.lang.StringgetString(java.util.ResourceBundle bundle, java.lang.String key)
Get a string from the resources.

param
bundle The resource bundle to fetch from.
param
key The key of the string to get.
return
The value for that string; if not found returns !key!.

		try {
			return bundle.getString(key);
		} catch (final MissingResourceException ex) {
			assert (false) : ex.getMessage();
			return '!" + key + '!";
		}