Fix UTF8 bug, create first executable JAR file
[jvcard.git] / src / com / googlecode / lanterna / gui2 / LocalizedString.java
... / ...
CommitLineData
1package com.googlecode.lanterna.gui2;
2
3import com.googlecode.lanterna.bundle.LocalizedUIBundle;
4
5import java.util.Locale;
6
7/**
8 * Set of predefined localized string.<br>
9 * All this strings are localized by using {@link LocalizedUIBundle}.<br>
10 * Changing the locale by calling {@link Locale#setDefault(Locale)}.
11 * @author silveryocha.
12 */
13public final class LocalizedString {
14
15 /**
16 * "OK"
17 */
18 public final static LocalizedString OK = new LocalizedString("short.label.ok");
19 /**
20 * "Cancel"
21 */
22 public final static LocalizedString Cancel = new LocalizedString("short.label.cancel");
23 /**
24 * "Yes"
25 */
26 public final static LocalizedString Yes = new LocalizedString("short.label.yes");
27 /**
28 * "No"
29 */
30 public final static LocalizedString No = new LocalizedString("short.label.no");
31 /**
32 * "Close"
33 */
34 public final static LocalizedString Close = new LocalizedString("short.label.close");
35 /**
36 * "Abort"
37 */
38 public final static LocalizedString Abort = new LocalizedString("short.label.abort");
39 /**
40 * "Ignore"
41 */
42 public final static LocalizedString Ignore = new LocalizedString("short.label.ignore");
43 /**
44 * "Retry"
45 */
46 public final static LocalizedString Retry = new LocalizedString("short.label.retry");
47 /**
48 * "Continue"
49 */
50 public final static LocalizedString Continue = new LocalizedString("short.label.continue");
51 /**
52 * "Open"
53 */
54 public final static LocalizedString Open = new LocalizedString("short.label.open");
55 /**
56 * "Save"
57 */
58 public final static LocalizedString Save = new LocalizedString("short.label.save");
59
60 private final String bundleKey;
61
62 private LocalizedString(final String bundleKey) {
63 this.bundleKey = bundleKey;
64 }
65
66 @Override
67 public String toString() {
68 return LocalizedUIBundle.get(Locale.getDefault(), bundleKey);
69 }
70}