public class Strings extends Object
Bundles are searched from most- to least-recently added.
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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... args)
Returns a formatted localized string for the given key and arguments,
or the key if no corresponding localized string is found.
|
public static final String TOOLTIP_SUFFIX
public static final String DIALOG_SUFFIX
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.
Abbot is hosted on