diff options
author | tzefferer <tzefferer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-10-16 09:54:37 +0000 |
---|---|---|
committer | tzefferer <tzefferer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-10-16 09:54:37 +0000 |
commit | 4b8b858ddcab0bfbde80304a0f631233388a13d1 (patch) | |
tree | 7e39eb2039427a4d3771a6555753a316bd2c25eb /BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java | |
parent | 91b596dcba1e95e787134d22a776ea0cee815e57 (diff) | |
download | mocca-4b8b858ddcab0bfbde80304a0f631233388a13d1.tar.gz mocca-4b8b858ddcab0bfbde80304a0f631233388a13d1.tar.bz2 mocca-4b8b858ddcab0bfbde80304a0f631233388a13d1.zip |
Keyboard accessibility for Online-BKU
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@528 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java')
-rw-r--r-- | BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java new file mode 100644 index 00000000..1e3fabbd --- /dev/null +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java @@ -0,0 +1,44 @@ +package at.gv.egiz.bku.gui;
+
+import java.applet.AppletContext;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ *
+ * @author Thomas Zefferer <thomas.zefferer@iaik.tugraz.at>
+ */
+public class SwitchFocusListener implements ActionListener {
+
+ protected final static Log log = LogFactory.getLog(SwitchFocusListener.class);
+
+ protected AppletContext ctx;
+ protected String javascriptFunction;
+
+ public SwitchFocusListener(AppletContext ctx, String javascriptFunction) {
+
+ this.ctx = ctx;
+ this.javascriptFunction = javascriptFunction;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+
+ try {
+ ctx.showDocument
+ (new URL("javascript:" + javascriptFunction));
+ }
+ catch (MalformedURLException me) {
+
+ log.warn("Unable to call external javascript function.", me);
+ }
+
+
+ }
+
+}
|