summaryrefslogtreecommitdiff
path: root/BKULocal/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
Diffstat (limited to 'BKULocal/src/main/java/at/gv/egiz')
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java5
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java6
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java15
3 files changed, 15 insertions, 11 deletions
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
index 3f560967..c724c071 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
@@ -9,13 +9,14 @@ import javax.swing.JDialog;
import at.gv.egiz.bku.gui.BKUGUIFacade;
import at.gv.egiz.smcc.PINSpec;
import at.gv.egiz.stal.HashDataInput;
+import javax.swing.JFrame;
public class BKUGuiProxy implements BKUGUIFacade {
private BKUGUIFacade delegate;
- private JDialog dialog;
+ private JFrame dialog;
- public BKUGuiProxy(JDialog dialog, BKUGUIFacade delegate) {
+ public BKUGuiProxy(JFrame dialog, BKUGUIFacade delegate) {
this.delegate = delegate;
this.dialog = dialog;
}
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java
index a782de1a..ca4d35d1 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java
@@ -24,7 +24,7 @@ import at.gv.egiz.stal.STALResponse;
import at.gv.egiz.stal.SignRequest;
import java.util.List;
-import javax.swing.JDialog;
+import javax.swing.JFrame;
/**
*
@@ -32,9 +32,9 @@ import javax.swing.JDialog;
*/
public class LocalBKUWorker extends AbstractBKUWorker {
- private JDialog container;
+ private JFrame container;
- public LocalBKUWorker(BKUGUIFacade gui, JDialog container) {
+ public LocalBKUWorker(BKUGUIFacade gui, JFrame container) {
super(gui);
this.container = container;
addRequestHandler(SignRequest.class,
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 008e0581..577e83c8 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
@@ -21,16 +21,15 @@ import java.awt.Toolkit;
import java.net.MalformedURLException;
import java.util.Locale;
-import javax.swing.JDialog;
-import javax.swing.WindowConstants;
import at.gv.egiz.bku.gui.BKUGUIFacade;
import at.gv.egiz.bku.gui.BKUGUIImpl;
-import at.gv.egiz.bku.gui.DefaultHelpListener;
import at.gv.egiz.bku.local.gui.LocalHelpListener;
import at.gv.egiz.stal.STAL;
import at.gv.egiz.stal.STALFactory;
import java.net.URL;
+import javax.swing.JFrame;
+import javax.swing.JRootPane;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -44,7 +43,13 @@ public class LocalSTALFactory implements STALFactory {
public STAL createSTAL() {
LocalBKUWorker stal;
- JDialog dialog = new JDialog();
+ //http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html
+ // use undecorated JFrame instead of JWindow,
+ // which creates an invisible owning frame and therefore cannot getFocusInWindow()
+ JFrame dialog = new JFrame();
+ dialog.setUndecorated(true);
+ dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE);
+
if (locale != null) {
dialog.setLocale(locale);
}
@@ -65,8 +70,6 @@ public class LocalSTALFactory implements STALFactory {
helpListener);
stal = new LocalBKUWorker(new BKUGuiProxy(dialog, gui), dialog);
dialog.setPreferredSize(new Dimension(400, 200));
- dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
- dialog.setTitle("MOCCA");
dialog.pack();
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = dialog.getSize();