summaryrefslogtreecommitdiff
path: root/BKUApplet/src/main/java/at/gv
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-11-13 20:56:23 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-11-13 20:56:23 +0000
commitfef61ddc786960015c6fc416d4ad2d5d0f2048d1 (patch)
tree2f7a61808b9104d36fe23c3ac929d248faa0085e /BKUApplet/src/main/java/at/gv
parent547d2ac46ea1feb323fd945de690b8ee0ca9c5f3 (diff)
downloadmocca-fef61ddc786960015c6fc416d4ad2d5d0f2048d1.tar.gz
mocca-fef61ddc786960015c6fc416d4ad2d5d0f2048d1.tar.bz2
mocca-fef61ddc786960015c6fc416d4ad2d5d0f2048d1.zip
bugfix openwindow blocked
bugfix helpTopic always hashdataviewer git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@168 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUApplet/src/main/java/at/gv')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java2
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/DefaultHelpListener.java38
2 files changed, 9 insertions, 31 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 b4407b22..4b49c5d5 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
@@ -90,7 +90,7 @@ public class BKUApplet extends JApplet implements AppletParameterProvider {
try {
URL helpURL = getURLParameter(HELP_URL); //, getAppletParameter(SESSION_ID));
// helpListener = new BrowserHelpListener(getAppletContext(), helpURL, getLocale());
- helpListener = new DefaultHelpListener(helpURL, getLocale());
+ helpListener = new DefaultHelpListener(getAppletContext(), helpURL, getLocale());
} catch (MalformedURLException ex) {
log.warn("failed to load help URL, disabling help: " + ex.getMessage());
}
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/DefaultHelpListener.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/DefaultHelpListener.java
index 9876ef7e..6eec5665 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/DefaultHelpListener.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/DefaultHelpListener.java
@@ -16,49 +16,28 @@
*/
package at.gv.egiz.bku.online.applet;
+import at.gv.egiz.bku.gui.HelpViewer;
import at.gv.egiz.bku.gui.AbstractHelpListener;
-import at.gv.egiz.bku.gui.ViewerDialog;
-import java.io.InputStream;
+import java.applet.AppletContext;
import java.net.URL;
-import java.net.URLConnection;
import java.util.Locale;
import javax.swing.SwingUtilities;
/**
- * This class depends on BKU utils, and therefore is not part of BKUCommonGUI
*
* @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at>
*/
public class DefaultHelpListener extends AbstractHelpListener {
- public DefaultHelpListener(URL helpURL, Locale locale) {
+ protected AppletContext ctx;
+
+ public DefaultHelpListener(AppletContext ctx, URL helpURL, Locale locale) {
super(helpURL, locale);
+ this.ctx = ctx;
}
@Override
- public void showDocument(URL helpURL, final String helpTopic) throws Exception {
- log.debug("open connection " + helpURL);
- URLConnection conn = helpURL.openConnection();
-
- log.debug("show help document " + conn.getContentType()); // + ";" + conn.getContentEncoding());
-
-// Charset cs;
-// if (conn.getContentEncoding() == null) {
-// cs = Charset.forName("UTF-8");
-// } else {
-// try {
-// cs = Charset.forName(conn.getContentEncoding());
-// } catch (Exception ex) {
-// log.debug("charset " + conn.getContentEncoding() + " not supported, assuming UTF-8: " + ex.getMessage());
-// cs = Charset.forName("UTF-8");
-// }
-// }
-
-// InputStreamReader isr = new InputStreamReader(conn.getInputStream(), cs);
-// final Reader content = new BufferedReader(isr);
- final InputStream content = conn.getInputStream();
- final String mimeType = conn.getContentType();
-
+ public void showDocument(final URL helpURL, final String helpTopic) throws Exception {
log.debug("schedule help dialog");
SwingUtilities.invokeLater(new Runnable() {
@@ -68,10 +47,9 @@ public class DefaultHelpListener extends AbstractHelpListener {
log.debug("show help dialog");
- ViewerDialog.showHelp(null, helpTopic, content, mimeType, messages);
+ HelpViewer.showHelpDialog(ctx, helpURL, helpTopic, messages);
}
});
-// gui.showHelpDialog(helpDocument.getStream(), mimetype, encoding);
}
}