summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-10-02 17:48:37 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-10-02 17:48:37 +0000
commit3b59e8f40dbddf0a752d39bb7d5c8bab86546205 (patch)
treebf69e20b958c9bdcd16b597978aa722504b1e75d
parent4f1d3a5341e8ca6d67fef79650ad9914d21619ae (diff)
downloadmocca-3b59e8f40dbddf0a752d39bb7d5c8bab86546205.tar.gz
mocca-3b59e8f40dbddf0a752d39bb7d5c8bab86546205.tar.bz2
mocca-3b59e8f40dbddf0a752d39bb7d5c8bab86546205.zip
[#439], [#478] MOCCA Dialog is AlwaysOnTop (follow up for [#439])
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@518 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java9
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HelpViewer.java1
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java1
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java6
4 files changed, 17 insertions, 0 deletions
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
index 35a53ff7..b84a2164 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
@@ -23,6 +23,7 @@ import java.awt.Color;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Font;
+import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
@@ -1243,6 +1244,14 @@ public class BKUGUIImpl implements BKUGUIFacade {
if (secureViewer == null) {
secureViewer = new SecureViewerDialog(null, messages,
helpListener.getActionListener());
+
+ // workaround for [#439]
+ // avoid AlwaysOnTop at least in applet, otherwise make secureViewer AlwaysOnTop since MOCCA Dialog (JFrame created in LocalSTALFactory) is always on top.
+ Window window = SwingUtilities.getWindowAncestor(contentPane);
+ if (window != null && window.isAlwaysOnTop()) {
+ log.debug("make secureViewer alwaysOnTop");
+ secureViewer.setAlwaysOnTop(true);
+ }
}
secureViewer.setContent(dataToBeSigned);
log.trace("show secure viewer returned");
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HelpViewer.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HelpViewer.java
index 364da6ec..48393101 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HelpViewer.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HelpViewer.java
@@ -86,6 +86,7 @@ public class HelpViewer extends JDialog
}
dialog = new HelpViewer(frame, messages, ctx, helpURL); //, helpTopic);
dialog.setVisible(true);
+ dialog.toFront();
}
private HelpViewer(Frame frame,
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java
index 6a16306b..84c2a5ff 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java
@@ -239,6 +239,7 @@ public class SecureViewerDialog extends JDialog implements ActionListener {
}
setVisible(true);
+ toFront();
}
private JPanel createButtonPanel() { //ActionListener saveListener, String saveCommand) {
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java
index ddbcaf46..d961b56f 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java
@@ -33,6 +33,7 @@ import at.gv.egiz.bku.local.gui.LocalHelpListener;
import at.gv.egiz.stal.STAL;
import at.gv.egiz.stal.STALFactory;
import java.awt.Image;
+import java.awt.Window;
import java.awt.event.WindowAdapter;
import java.net.URL;
import java.util.ArrayList;
@@ -85,6 +86,11 @@ public class LocalSTALFactory implements STALFactory {
// use undecorated JFrame instead of JWindow,
// which creates an invisible owning frame and therefore cannot getFocusInWindow()
JFrame dialog = new JFrame("Bürgerkarte");
+ if (log.isTraceEnabled()) {
+ log.debug("alwaysOnTop supported: " + dialog.isAlwaysOnTopSupported());
+ }
+ // [#439] make mocca dialog alwaysOnTop
+ dialog.setAlwaysOnTop(true);
dialog.setIconImages(icons);
dialog.setUndecorated(true);
// dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE);