diff options
author | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-08-14 10:52:45 +0000 |
---|---|---|
committer | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-08-14 10:52:45 +0000 |
commit | 9b77452c06a7bc02f05f7a46fb192ee3ba0dd952 (patch) | |
tree | 98310206c707899dbf05af0c1e2a197d7f41fc90 /BKULocal/src | |
parent | d791931ac69b0a2a1201ef7cd2f7ca247e92ba8c (diff) | |
download | mocca-9b77452c06a7bc02f05f7a46fb192ee3ba0dd952.tar.gz mocca-9b77452c06a7bc02f05f7a46fb192ee3ba0dd952.tar.bz2 mocca-9b77452c06a7bc02f05f7a46fb192ee3ba0dd952.zip |
[#380] window close event not handled in mocca local dialog
[#354] HTTPBindingProcessor: MAX_DATAURL_HOPS not configurable
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@432 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKULocal/src')
5 files changed, 17 insertions, 12 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(); diff --git a/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml b/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml index 8b0f1204..e96bd088 100644 --- a/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml +++ b/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml @@ -28,6 +28,7 @@ scope="singleton">
<constructor-arg ref="STALFactory"></constructor-arg>
<constructor-arg ref="commandInvoker"></constructor-arg>
+ <constructor-arg ref="configuration"></constructor-arg>
</bean>
<bean
class="org.springframework.web.context.support.ServletContextAttributeExporter">
diff --git a/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java b/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java index 2108d2b3..c6b69781 100644 --- a/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java +++ b/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java @@ -29,7 +29,7 @@ import at.gv.egiz.stal.SignRequest; @Ignore public class TestSignRequest { - + public void test() throws Exception { ByteArrayOutputStream os = new ByteArrayOutputStream(); StreamUtil.copyStream(getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/local/stal/sigInfo.xml"), os); |