|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.lpex.core.LpexResources
public final class LpexResources
This class can be used to access a resource file of the editor.
Methods without a resource-bundle argument use the editor's main resource
file, com.ibm.lpex.core.Resources.properties
.
In the resource files accessed by this class, for any single-quote
(apostrophe) ' which is part of the text, two single-quotes '' must
always be used.
A single-quote is otherwise considered the start of quoted (not interpreted)
text, and is discarded from the message returned, along with the corresponding
closing single-quote.
This feature is intended to simplify usage and eliminate incorrect translations
that are typical with the java.text.MessageFormat
class.
Examples:
action.keyInvalid="{0}" n''est pas une touche d''action valide. noSubstitution=Use '{0}, {1}, .., {n}' for substitutions. |
The only format element supported is an argument index.
Method Summary | |
---|---|
static String |
message(ResourceBundle resourceBundle,
String key)
Retrieve from the specified resource file the resource string with the specified key. |
static String |
message(ResourceBundle resourceBundle,
String key,
int arg1)
Retrieve from the specified resource file the resource string with the specified key and a single integer substitution argument. |
static String |
message(ResourceBundle resourceBundle,
String key,
int arg1,
int arg2)
Retrieve from the specified resource file the resource string with the specified key and two integer substitution arguments. |
static String |
message(ResourceBundle resourceBundle,
String key,
Object[] arguments)
Retrieves from the specified resource file the resource string with the specified key and performs argument substitution. |
static String |
message(ResourceBundle resourceBundle,
String key,
String arg1)
Retrieve from the specified resource file the resource string with the specified key and a single substitution argument. |
static String |
message(ResourceBundle resourceBundle,
String key,
String arg1,
String arg2)
Retrieve from the specified resource file the resource string with the specified key and two substitution arguments. |
static String |
message(String key)
Retrieve from the editor's main resource file the resource string with the specified key. |
static String |
message(String key,
int arg1)
Retrieve from the editor's main resource file the resource string with the specified key and a single integer substitution argument. |
static String |
message(String key,
int arg1,
int arg2)
Retrieve from the editor's main resource file the resource string with the specified key and two integer substitution arguments. |
static String |
message(String key,
Object[] arguments)
Retrieve from the editor's main resource file the resource string with the specified key and perform argument substitution. |
static String |
message(String key,
String arg1)
Retrieve from the editor's main resource file the resource string with the specified key and a single substitution argument. |
static String |
message(String key,
String arg1,
String arg2)
Retrieve from the editor's main resource file the resource string with the specified key and two substitution arguments. |
static String[] |
textMnemonic(String key)
Separate the '&' symbol from the text used for a label or caption. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String message(String key)
null
if not foundpublic static String message(ResourceBundle resourceBundle, String key)
null
if not foundpublic static String message(String key, Object[] arguments)
Message substitution is indicated by {n}
(where n = 0 .. 9);
to display braces, enclose them in single quotes (e.g., '{');
to display a single quote, use two consecutive single quote characters.
null
if message not foundpublic static String message(ResourceBundle resourceBundle, String key, Object[] arguments)
Message substitution is indicated by {n}
(where n = 0 .. 9);
to display braces, enclose them in single quotes (e.g., '{');
to display a single quote, use two consecutive single quote characters.
null
if message not foundpublic static String message(String key, int arg1)
null
if not foundpublic static String message(ResourceBundle resourceBundle, String key, int arg1)
null
if not foundpublic static String message(String key, int arg1, int arg2)
null
if not foundpublic static String message(ResourceBundle resourceBundle, String key, int arg1, int arg2)
null
if not foundpublic static String message(String key, String arg1)
null
if not foundpublic static String message(ResourceBundle resourceBundle, String key, String arg1)
null
if not foundpublic static String message(String key, String arg1, String arg2)
null
if not foundpublic static String message(ResourceBundle resourceBundle, String key, String arg1, String arg2)
null
if not foundpublic static String[] textMnemonic(String key)
key
- the key into Resources.properties
null
|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |