diff options
author | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-08-20 16:24:55 +0000 |
---|---|---|
committer | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-08-20 16:24:55 +0000 |
commit | 22001c93bca360d1b15c252cb22d2a4147ff350d (patch) | |
tree | 813f8cd7e0afa47a78ecc40cc8884eb770b89588 /BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java | |
parent | 2bd3c3e61966cf136d39826b6e1c6ff9fc946cef (diff) | |
download | mocca-22001c93bca360d1b15c252cb22d2a4147ff350d.tar.gz mocca-22001c93bca360d1b15c252cb22d2a4147ff350d.tar.bz2 mocca-22001c93bca360d1b15c252cb22d2a4147ff350d.zip |
[#430] Activation/PIN-management in MOCCA Web Start
- new Modules: smccSTALExt, BKUGuiExt in order not to depend on BKUAppletExt in BKULocal
- provide stal-request handler de-registration in abstractSMCCSTAL
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@448 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java')
-rw-r--r-- | BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java | 18 |
1 files changed, 14 insertions, 4 deletions
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 4c9554e2..712fb969 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 @@ -24,6 +24,9 @@ import java.util.Locale; import at.gv.egiz.bku.gui.BKUGUIFacade; import at.gv.egiz.bku.gui.BKUGUIImpl; +import at.gv.egiz.bku.gui.PINManagementGUI; +import at.gv.egiz.bku.gui.PINManagementGUIFacade; +import at.gv.egiz.bku.local.gui.GUIProxy; import at.gv.egiz.bku.local.gui.LocalHelpListener; import at.gv.egiz.stal.STAL; import at.gv.egiz.stal.STALFactory; @@ -33,10 +36,16 @@ import javax.swing.JRootPane; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +/** + * Creates a PINManagementGUI and a LocalBKUWorker, which in turn registers + * PINManagementRequestHandler from smccSTALExt. + * The RequestHandler expects PINManagementGUIFacade, therefore BKUGUIProxy has to implement the extended GUI. + * @author clemens + */ public class LocalSTALFactory implements STALFactory { protected static final Log log = LogFactory.getLog(LocalSTALFactory.class); - protected static final Dimension PREFERRED_SIZE = new Dimension(300, 189); + protected static final Dimension PREFERRED_SIZE = new Dimension(318, 200); protected String helpURL; protected Locale locale; @@ -47,7 +56,7 @@ public class LocalSTALFactory implements STALFactory { //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(); + JFrame dialog = new JFrame("Bürgerkarte"); dialog.setUndecorated(true); dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE); @@ -64,12 +73,13 @@ public class LocalSTALFactory implements STALFactory { } catch (MalformedURLException ex) { log.error("failed to configure help listener: " + ex.getMessage(), ex); } - BKUGUIFacade gui = new BKUGUIImpl(dialog.getContentPane(), + PINManagementGUIFacade gui = new PINManagementGUI(dialog.getContentPane(), dialog.getLocale(), BKUGUIFacade.Style.advanced, null, helpListener); - stal = new LocalBKUWorker(new BKUGuiProxy(dialog, gui), dialog); + BKUGUIFacade proxy = (BKUGUIFacade) GUIProxy.newInstance(gui, dialog, new Class[] { PINManagementGUIFacade.class} ); + stal = new LocalBKUWorker(proxy, dialog); dialog.setPreferredSize(PREFERRED_SIZE); dialog.pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); |