1
2
3
4
5
6
7
8
9
10
11
12 package sk.uniba.euromath.editor.xmlEditor.actions.lang;
13
14 import java.util.MissingResourceException;
15 import java.util.ResourceBundle;
16
17 /***
18 * Messages class for package sk.uniba.euromath.editor.xmlEditor.actions.
19 *
20 * @author Tomáš Studva 24.1.2006
21 */
22 public class Messages {
23 /***
24 * Name of bundle with messages.
25 */
26 private static final String BUNDLE_NAME = "sk.uniba.euromath.editor.xmlEditor.actions.lang.messages";
27
28 /***
29 * Resource bundle.
30 */
31 private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
32 .getBundle(BUNDLE_NAME);
33
34 /***
35 * Hides constructor.
36 */
37 private Messages() {
38 }
39
40 /***
41 * Message retreiving method.
42 *
43 * @param key
44 * identifier of messages
45 * @return message
46 */
47 public static String getString(String key) {
48 try {
49 return RESOURCE_BUNDLE.getString(key);
50 } catch (MissingResourceException e) {
51 return '!' + key + '!';
52 }
53 }
54 }