From 4b8b858ddcab0bfbde80304a0f631233388a13d1 Mon Sep 17 00:00:00 2001 From: tzefferer Date: Fri, 16 Oct 2009 09:54:37 +0000 Subject: Keyboard accessibility for Online-BKU git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@528 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../at/gv/egiz/bku/gui/SwitchFocusListener.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java (limited to 'BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java') 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 + */ +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); + } + + + } + +} -- cgit v1.2.3 From caca721368d8c24559b1cd5ea2018884b4874f6b Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 10 Nov 2009 15:30:16 +0000 Subject: Removed switchFocusListener due to problem with viewer/help dialogs on Firefox/Mac git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@539 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java') 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 index 1e3fabbd..48b641e2 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SwitchFocusListener.java @@ -33,8 +33,8 @@ public class SwitchFocusListener implements ActionListener { ctx.showDocument (new URL("javascript:" + javascriptFunction)); } - catch (MalformedURLException me) { - + catch (MalformedURLException me) { + log.warn("Unable to call external javascript function.", me); } -- cgit v1.2.3