summaryrefslogtreecommitdiff
path: root/BKUApplet
diff options
context:
space:
mode:
Diffstat (limited to 'BKUApplet')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java20
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java17
-rw-r--r--BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.pngbin4035 -> 0 bytes
3 files changed, 13 insertions, 24 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
index 50d66d80..bde055ec 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
@@ -40,7 +40,6 @@ public class BKUApplet extends JApplet {
private static Log log = LogFactory.getLog(BKUApplet.class);
public static final String GUI_STYLE = "GuiStyle";
- public final static String RESOURCE_BUNDLE_BASE = "at/gv/egiz/bku/online/applet/Messages";
public final static String LOCALE_PARAM_KEY = "Locale";
public final static String LOGO_URL_KEY = "LogoURL";
public final static String WSDL_URL = "WSDL_URL";
@@ -52,7 +51,6 @@ public class BKUApplet extends JApplet {
public static final String REDIRECT_URL = "RedirectURL";
public static final String REDIRECT_TARGET = "RedirectTarget";
public static final String HASHDATA_DISPLAY_INTERNAL = "internal";
- protected ResourceBundle resourceBundle;
protected BKUWorker worker;
protected Thread workerThread;
@@ -64,14 +62,9 @@ public class BKUApplet extends JApplet {
log.info("Welcome to MOCCA\n");
log.debug("Called init()");
HttpsURLConnection.setDefaultSSLSocketFactory(InternalSSLSocketFactory.getInstance());
- String localeString = getMyAppletParameter(LOCALE_PARAM_KEY);
- Locale locale = null;
- if (localeString != null) {
- locale = new Locale(localeString);
- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE,
- locale);
- } else {
- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE);
+ String locale = getMyAppletParameter(LOCALE_PARAM_KEY);
+ if (locale != null) {
+ this.setLocale(new Locale(locale));
}
String backgroundString = getMyAppletParameter(BACKGROUND_PARAM);
URL background = null;
@@ -84,15 +77,16 @@ public class BKUApplet extends JApplet {
}
String guiStyle = getMyAppletParameter(GUI_STYLE);
BKUGUIFacade gui = BKUGUIFactory.createGUI(guiStyle);
+ log.debug("setting GUI locale to " + getLocale());
AppletHelpListener helpListener = null;
try {
URL helpURL = getMyAppletParameterURL(HELP_URL);
- helpListener = new AppletHelpListener(getAppletContext(), helpURL, locale);
+ helpListener = new AppletHelpListener(getAppletContext(), helpURL, getLocale());
} catch (MalformedURLException ex) {
log.error("invalid help URL: " + ex.getMessage());
}
- gui.init(getContentPane(), localeString, background, helpListener);
- worker = new BKUWorker(gui, this, resourceBundle);
+ gui.init(getContentPane(), getLocale(), background, helpListener);
+ worker = new BKUWorker(gui, this);
}
@Override
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java
index 78f3dc12..843f6c4c 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUWorker.java
@@ -48,7 +48,6 @@ import at.gv.egiz.stal.service.types.ObjectFactory;
import at.gv.egiz.stal.service.types.RequestType;
import at.gv.egiz.stal.service.types.ResponseType;
import at.gv.egiz.stal.util.STALTranslator;
-import javax.naming.ConfigurationException;
public class BKUWorker extends AbstractSMCCSTAL implements Runnable,
ActionListener, SMCCSTALRequestHandler {
@@ -57,25 +56,22 @@ public class BKUWorker extends AbstractSMCCSTAL implements Runnable,
protected BKUGUIFacade gui;
protected BKUApplet parent;
private STALPortType stalPort;
-// private URL hashDataURL;
protected List<String> actionCommandList = new ArrayList<String>();
protected Boolean actionPerformed = false;
protected boolean finished = false;
- protected ResourceBundle errorMessages;
/**
*
* @param gui
* must not be null
*/
- public BKUWorker(BKUGUIFacade gui, BKUApplet parent,
- ResourceBundle errorMessageBundle) {
- if ((gui == null) || (parent == null) || (errorMessageBundle == null)) {
+ public BKUWorker(BKUGUIFacade gui, BKUApplet parent) {
+ if (gui == null || parent == null) {
throw new NullPointerException("Parameter must not be set to null");
}
this.gui = gui;
+ this.locale = gui.getLocale();
this.parent = parent;
- this.errorMessages = errorMessageBundle;
addRequestHandler(QuitRequest.class, this);
// register SignRequestHandler once we have a webservice port
}
@@ -86,9 +82,9 @@ public class BKUWorker extends AbstractSMCCSTAL implements Runnable,
* @param gui
* @param errorMessageBundle
*/
- protected BKUWorker(BKUGUIFacade gui, ResourceBundle errorMessageBundle) {
+ protected BKUWorker(BKUGUIFacade gui) {
this.gui = gui;
- this.errorMessages = errorMessageBundle;
+ this.locale = gui.getLocale();
addRequestHandler(QuitRequest.class, this);
}
@@ -342,8 +338,7 @@ public class BKUWorker extends AbstractSMCCSTAL implements Runnable,
}
break;
case SMCCHelper.CARD_FOUND:
- // gui.showWaitDialog(null);
- signatureCard = smccHelper.getSignatureCard(errorMessages.getLocale());
+ signatureCard = smccHelper.getSignatureCard(locale);
return false;
}
smccHelper.update(3000);
diff --git a/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png b/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png
deleted file mode 100644
index eee4be4f..00000000
--- a/BKUApplet/src/main/resources/at/gv/egiz/bku/online/applet/images/logo.png
+++ /dev/null
Binary files differ