|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object abbot.i18n.Strings
public class Strings
Provides support for loading localized strings. Bundles may be added by specifying the full resource name or by a simple name located in com.oculustech.i18n.
Bundles are searched from most- to least-recently added.
Field Summary | |
---|---|
static String |
DIALOG_SUFFIX
Resources whose name ends with this suffix (".dlg") will automatically be formatted by the dialog formatter. |
static String |
TOOLTIP_SUFFIX
Resources whose name ends with this suffix (".tip") will automatically be formatted by the tooltip formatter. |
Method Summary | |
---|---|
static void |
addBundle(ResourceBundle b)
Add the given ResourceBundle as one to be searched. |
static ResourceBundle |
addBundle(String name)
Add the given bundle to the list searched. |
static ResourceBundle |
addBundle(String name,
ClassLoader cl)
Add the given bundle to the list searched, loading from the given class loader. |
static String |
get(String key)
Returns the localized String for the given key, or the key surrounded by '#' if no corresponding localized string is found. |
static String |
get(String key,
boolean optional)
Returns the localized string for the given key. |
static String |
get(String key,
Object arg)
Convenience method for a single-argument format. |
static String |
get(String key,
Object[] args)
Returns a formatted localized string for the given key and arguments, or the key if no corresponding localized string is found. |
static String |
get(String key,
Object arg1,
Object arg2)
Convenience method for a two-argument format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TOOLTIP_SUFFIX
TextFormat.tooltip(java.lang.String)
,
Constant Field Valuespublic static final String DIALOG_SUFFIX
TextFormat.dialog(java.lang.String)
,
Constant Field ValuesMethod Detail |
---|
public static ResourceBundle addBundle(String name) throws MissingResourceException
MissingResourceException
public static ResourceBundle addBundle(String name, ClassLoader cl) throws MissingResourceException
MissingResourceException
public static void addBundle(ResourceBundle b)
ResourceBundle
as one to be searched.
public static String get(String key)
public static String get(String key, boolean optional)
public static String get(String key, Object[] args)
MessageFormat
syntax for the format string and
arguments.
public static String get(String key, Object arg)
public static String get(String key, Object arg1, Object arg2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |