summaryrefslogtreecommitdiff
path: root/BKULocal/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 /BKULocal/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 'BKULocal/src/main/java')
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java10
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java6
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java16
3 files changed, 15 insertions, 17 deletions
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
index 8a850549..44cae8a0 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
@@ -10,6 +10,7 @@ import java.awt.event.WindowEvent;
import java.net.URL;
import java.util.List;
+import java.util.Locale;
import javax.swing.JDialog;
import at.gv.egiz.bku.gui.BKUGUIFacade;
@@ -37,8 +38,13 @@ public class BKUGuiProxy implements BKUGUIFacade {
}
@Override
- public void init(Container contentPane, String localeString, URL bgImage, ActionListener helpListener) {
- delegate.init(contentPane, localeString, bgImage, helpListener);
+ public void init(Container contentPane, Locale locale, URL bgImage, ActionListener helpListener) {
+ delegate.init(contentPane, locale, bgImage, helpListener);
+ }
+
+ @Override
+ public Locale getLocale() {
+ return delegate.getLocale();
}
@Override
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java
index 1bbb2e3c..6bf37c40 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java
@@ -1,7 +1,6 @@
package at.gv.egiz.bku.local.stal;
import java.util.List;
-import java.util.ResourceBundle;
import javax.swing.JDialog;
@@ -16,9 +15,8 @@ public class SMCCSTAL extends BKUWorker {
private JDialog container;
- public SMCCSTAL(BKUGUIFacade gui, JDialog container,
- ResourceBundle errorMessageBundle) {
- super(gui, errorMessageBundle);
+ public SMCCSTAL(BKUGUIFacade gui, JDialog container) {
+ super(gui);
this.container = container;
addRequestHandler(SignRequest.class, new LocalSignRequestHandler());
}
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
index 4cc7bcd3..ad7b9646 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
@@ -28,7 +28,6 @@ import javax.swing.WindowConstants;
import at.gv.egiz.bku.gui.BKUGUIFacade;
import at.gv.egiz.bku.gui.BKUGUIFactory;
import at.gv.egiz.bku.local.gui.LocalHelpListener;
-import at.gv.egiz.bku.online.applet.BKUApplet;
import at.gv.egiz.stal.STAL;
import at.gv.egiz.stal.STALFactory;
import java.net.URL;
@@ -45,28 +44,23 @@ public class SMCCSTALFactory implements STALFactory {
public STAL createSTAL() {
SMCCSTAL stal;
- JDialog dialog;
- ResourceBundle resourceBundle;
+ JDialog dialog = new JDialog();
if (locale != null) {
- resourceBundle = ResourceBundle.getBundle(BKUApplet.RESOURCE_BUNDLE_BASE,
- locale);
- } else {
- resourceBundle = ResourceBundle.getBundle(BKUApplet.RESOURCE_BUNDLE_BASE);
+ dialog.setLocale(locale);
}
- dialog = new JDialog();
BKUGUIFacade gui = BKUGUIFactory.createGUI(BKUGUIFactory.ADVANCED_GUI);
LocalHelpListener helpListener = null;
try {
if (helpURL != null) {
- helpListener = new LocalHelpListener(new URL(helpURL), locale);
+ helpListener = new LocalHelpListener(new URL(helpURL), dialog.getLocale());
} else {
log.warn("no HELP URL configured, help system disabled");
}
} catch (MalformedURLException ex) {
log.error("failed to configure help listener: " + ex.getMessage(), ex);
}
- gui.init(dialog.getContentPane(), locale.toString(), null, helpListener);
- stal = new SMCCSTAL(new BKUGuiProxy(dialog, gui), dialog, resourceBundle);
+ gui.init(dialog.getContentPane(), dialog.getLocale(), null, helpListener);
+ stal = new SMCCSTAL(new BKUGuiProxy(dialog, gui), dialog);
dialog.setPreferredSize(new Dimension(400, 200));
dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
dialog.setTitle("MOCCA");