summaryrefslogtreecommitdiff
path: root/BKUCommonGUI/src/main/java
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-11-03 12:36:42 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-11-03 12:36:42 +0000
commit6211ed7f96c4ee6e1616a7c1e44477b9f3e8117f (patch)
treec419abc42763c58d9e77e473c95e63addc8ccb0a /BKUCommonGUI/src/main/java
parent16b188bae57cfc10c94a0e251a815ab35345e113 (diff)
downloadmocca-6211ed7f96c4ee6e1616a7c1e44477b9f3e8117f.tar.gz
mocca-6211ed7f96c4ee6e1616a7c1e44477b9f3e8117f.tar.bz2
mocca-6211ed7f96c4ee6e1616a7c1e44477b9f3e8117f.zip
localization
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@140 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUCommonGUI/src/main/java')
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java11
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java9
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java11
3 files changed, 24 insertions, 7 deletions
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
index 27841d1c..9f733a14 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
@@ -92,10 +92,10 @@ public class BKUGUI implements BKUGUIFacade {
* @param localeString may be null
*/
@Override
- public void init(final Container contentPane, String localeString, final URL background, ActionListener helpListener) {
+ public void init(final Container contentPane, Locale locale, final URL background, ActionListener helpListener) {
- if (localeString != null) {
- messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, new Locale(localeString));
+ if (locale != null) {
+ messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, locale);
} else {
messages = ResourceBundle.getBundle(MESSAGES_BUNDLE);
}
@@ -249,6 +249,11 @@ public class BKUGUI implements BKUGUIFacade {
}
@Override
+ public Locale getLocale() {
+ return messages.getLocale();
+ }
+
+ @Override
public void showLoginDialog(ActionListener loginListener, String actionCommand) {
log.debug("scheduling login dialog");
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
index 4ef1b7d9..6655cf64 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
@@ -24,6 +24,7 @@ import java.awt.Container;
import java.awt.event.ActionListener;
import java.net.URL;
import java.util.List;
+import java.util.Locale;
public interface BKUGUIFacade {
@@ -85,7 +86,13 @@ public interface BKUGUIFacade {
public static final String SAVE_HASHDATAINPUT_PREFIX = "save.hashdatainput.prefix";
- public void init(Container contentPane, String localeString, URL background, ActionListener helpListener);
+ public void init(Container contentPane, Locale locale, URL background, ActionListener helpListener);
+
+ /**
+ *
+ * @return the locale of the message bundle (what if no message bundle could be loaded for the requested locale?)
+ */
+ public Locale getLocale();
public void showWelcomeDialog();
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java
index 195db27a..a005292e 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java
@@ -90,10 +90,10 @@ public class SimpleGUI implements BKUGUIFacade {
* @param localeString may be null
*/
@Override
- public void init(final Container contentPane, String localeString, final URL background, ActionListener helpListener) {
+ public void init(final Container contentPane, Locale locale, final URL background, ActionListener helpListener) {
- if (localeString != null) {
- messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, new Locale(localeString));
+ if (locale != null) {
+ messages = ResourceBundle.getBundle(MESSAGES_BUNDLE, locale);
} else {
messages = ResourceBundle.getBundle(MESSAGES_BUNDLE);
}
@@ -244,6 +244,11 @@ public class SimpleGUI implements BKUGUIFacade {
}
@Override
+ public Locale getLocale() {
+ return messages.getLocale();
+ }
+
+ @Override
public void showLoginDialog(ActionListener loginListener, String actionCommand) {
log.debug("scheduling login dialog");