summaryrefslogtreecommitdiff
path: root/BKUGuiExt
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-04-02 16:38:59 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-04-02 16:38:59 +0000
commitf8db5af9c94285c4946bdf38407fe15ed1b7f818 (patch)
treebaf5d1db2da875abf1b90daf5119fe04f8a9db18 /BKUGuiExt
parent8a6896444ce9b14c27193e688a8eeb59e1f51a4d (diff)
downloadmocca-f8db5af9c94285c4946bdf38407fe15ed1b7f818.tar.gz
mocca-f8db5af9c94285c4946bdf38407fe15ed1b7f818.tar.bz2
mocca-f8db5af9c94285c4946bdf38407fe15ed1b7f818.zip
* Save certificates to local file system
* Show cardreader and smartcard information for Webstart and Applet version git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1042 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUGuiExt')
-rw-r--r--BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUI.java216
-rw-r--r--BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUIFacade.java51
-rw-r--r--BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java306
-rw-r--r--BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUIFacade.java43
-rw-r--r--BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties12
-rw-r--r--BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_de.properties12
6 files changed, 640 insertions, 0 deletions
diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUI.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUI.java
new file mode 100644
index 00000000..3fb0bde4
--- /dev/null
+++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUI.java
@@ -0,0 +1,216 @@
+/*
+ * Copyright 2011 by Graz University of Technology, Austria
+ * MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
+ * initiative of the Federal Chancellery Austria and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+
+package at.gv.egiz.bku.gui;
+
+import java.awt.Container;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.Locale;
+
+import javax.swing.GroupLayout;
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.LayoutStyle;
+import javax.swing.SwingUtilities;
+import javax.swing.filechooser.FileFilter;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import at.gv.egiz.bku.gui.viewer.FontProvider;
+
+/**
+*
+* @author Thomas Lenz <thomas.lenz@iaik.tugraz.at>
+*/
+
+public class GetCertificateGUI extends CardMgmtGUI implements
+ GetCertificateGUIFacade {
+
+ private final Logger log = LoggerFactory.getLogger(GetCertificateGUI.class);
+
+ protected JButton getSimCertButton;
+ protected JButton getQualCertButton;
+
+ public GetCertificateGUI(Container contentPane, Locale locale,
+ URL backgroundImgURL, FontProvider fontProvider,
+ HelpListener helpListener, SwitchFocusListener switchFocusListener) {
+ super(contentPane, locale, Style.advanced, backgroundImgURL, fontProvider,
+ helpListener, switchFocusListener);
+
+
+ }
+
+ @Override
+ public void showGETCertificateDialog(final ActionListener certificateListener,
+ final String showGetQualCert, final String showGetSimCert,
+ final ActionListener cancelListener, final String cancelCmd) {
+
+ SwingUtilities.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ mainPanel.removeAll();
+ buttonPanel.removeAll();
+
+ titleLabel.setText(getMessage(TITLE_GETCERTIFICATE));
+
+ getSimCertButton = new JButton();
+ getSimCertButton.setFont(okButton.getFont().deriveFont(okButton.getFont().getStyle()& ~java.awt.Font.BOLD));
+ getSimCertButton.setText(getMessage(BUTTON_SIM_CERT));
+ getSimCertButton.setActionCommand(showGetSimCert);
+ getSimCertButton.addActionListener(certificateListener);
+ getSimCertButton.setEnabled(true);
+
+ getQualCertButton = new JButton();
+ getQualCertButton.setFont(okButton.getFont().deriveFont(okButton.getFont().getStyle()& ~java.awt.Font.BOLD));
+ getQualCertButton.setText(getMessage(BUTTON_QUAL_CERT));
+ getQualCertButton.setActionCommand(showGetQualCert);
+ getQualCertButton.addActionListener(certificateListener);
+ getQualCertButton.setEnabled(true);
+
+ cancelButton.setFont(cancelButton.getFont().deriveFont(cancelButton.getFont().getStyle()& ~java.awt.Font.BOLD));
+ cancelButton.setText(getMessage(BUTTON_CLOSE));
+ cancelButton.setActionCommand(cancelCmd);
+ cancelButton.addActionListener(cancelListener);
+ cancelButton.setEnabled(true);
+
+ GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel);
+ buttonPanel.setLayout(buttonPanelLayout);
+
+ //---------------------------------------------------------------------------------------------------------
+
+ GroupLayout mainPanelLayout = new GroupLayout(mainPanel);
+ mainPanelLayout.setHorizontalGroup(
+ mainPanelLayout.createParallelGroup(GroupLayout.Alignment.CENTER)
+ .addGroup(mainPanelLayout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
+ .addComponent(getQualCertButton, GroupLayout.DEFAULT_SIZE,
+ GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGap(12))
+ .addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
+ .addGap(1)
+ .addComponent(getSimCertButton, GroupLayout.DEFAULT_SIZE,
+ getQualCertButton.getSize().width, Short.MAX_VALUE)
+ .addContainerGap())))
+ );
+ mainPanelLayout.setVerticalGroup(
+ mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addGroup(mainPanelLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(getSimCertButton, GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)
+ .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(getQualCertButton, GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)
+ ));
+
+ mainPanel.setLayout(mainPanelLayout);
+ //---------------------------------------------------------------------------------------------------------
+
+
+ GroupLayout.ParallelGroup buttonHorizontal = buttonPanelLayout
+ .createParallelGroup(GroupLayout.Alignment.CENTER)
+ .addComponent(cancelButton, GroupLayout.PREFERRED_SIZE, buttonSize, GroupLayout.PREFERRED_SIZE);
+
+ GroupLayout.Group buttonVertical = buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
+ .addComponent(cancelButton);
+
+ buttonPanelLayout.setHorizontalGroup(buttonHorizontal);
+ buttonPanelLayout.setVerticalGroup(buttonVertical);
+
+
+
+ if (windowCloseAdapter != null) {
+ windowCloseAdapter.registerListener(cancelListener, cancelCmd);
+ }
+
+ contentPanel.validate();
+
+ resize();
+ }
+ });
+ }
+
+ @Override
+ public void resize() {
+
+ log.debug("Resizing Get-Certificate Applet ...");
+
+ float factor = getResizeFactor();
+
+ if (getQualCertButton != null) {
+
+ getQualCertButton.setFont(getQualCertButton.getFont().deriveFont(
+ (float) (baseFontSize * factor)));
+
+ }
+
+ if (getSimCertButton != null) {
+
+ getSimCertButton.setFont(getSimCertButton.getFont().deriveFont(
+ (float) (baseFontSize * factor)));
+
+ }
+
+
+ super.resize();
+ }
+
+ public File showSaveDialog(String defaultfilename) {
+
+
+ JFileChooser filechooser = new JFileChooser();
+
+ filechooser.setMultiSelectionEnabled(false);
+ filechooser.setDialogTitle(getMessage(TITEL_FILESAVE));
+ filechooser.setSelectedFile(new File(defaultfilename));
+ filechooser.setFileFilter( new FileFilter()
+ {
+ @Override public boolean accept( File f )
+ {
+ return f.isDirectory() ||
+ f.getName().toLowerCase().endsWith( ".cer" );
+ }
+ @Override public String getDescription()
+ {
+ return getMessage(FILE_TYPE_NAME);
+ }
+ } );
+
+ int state = filechooser.showSaveDialog(contentPane);
+
+ if (state == JFileChooser.APPROVE_OPTION) {
+ return filechooser.getSelectedFile();
+
+ } else {
+ log.info("Save certificate dialog canceled");
+ return null;
+ }
+ }
+
+}
diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUIFacade.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUIFacade.java
new file mode 100644
index 00000000..b327f385
--- /dev/null
+++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUIFacade.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2011 by Graz University of Technology, Austria
+ * MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
+ * initiative of the Federal Chancellery Austria and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+
+package at.gv.egiz.bku.gui;
+
+import java.awt.event.ActionListener;
+import java.io.File;
+
+/**
+*
+* @author Thomas Lenz <thomas.lenz@iaik.tugraz.at>
+*/
+
+public interface GetCertificateGUIFacade extends BKUGUIFacade {
+
+ public static final String BUTTON_SIM_CERT = "button.simple.certificate";
+ public static final String BUTTON_QUAL_CERT = "button.qualified.certificate";
+ public static final String FILE_TYPE_NAME = "file.certificate";
+ public static final String TITEL_FILESAVE = "title.certificate.save";
+ public static final String TITLE_GETCERTIFICATE = "title.get.certificate";
+
+ public static final String FILENAME_QUAL_CERT = "qualified.cer";
+ public static final String FILENAME_SIM_CERT = "simple.cer";
+
+
+ public void showGETCertificateDialog(ActionListener certificateListener, String showGetQualCert,
+ String showGetSimCert, ActionListener cancelListener, String cancelCmd);
+
+ public File showSaveDialog(String defaultfilename);
+
+}
diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java
new file mode 100644
index 00000000..1088545d
--- /dev/null
+++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUI.java
@@ -0,0 +1,306 @@
+/*
+ * Copyright 2011 by Graz University of Technology, Austria
+ * MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
+ * initiative of the Federal Chancellery Austria and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+
+package at.gv.egiz.bku.gui;
+
+import java.awt.Container;
+import java.awt.Font;
+import java.awt.event.ActionListener;
+import java.net.URL;
+import java.util.Locale;
+
+import javax.swing.GroupLayout;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.LayoutStyle.ComponentPlacement;
+import javax.swing.SwingConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.border.TitledBorder;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import at.gv.egiz.bku.gui.viewer.FontProvider;
+
+/**
+*
+* @author Thomas Lenz <thomas.lenz@iaik.tugraz.at>
+*/
+
+public class GetHardwareInfoGUI extends CardMgmtGUI implements
+ GetHardwareInfoGUIFacade {
+
+ private final Logger log = LoggerFactory.getLogger(GetHardwareInfoGUI.class);
+
+ protected JLabel lblTyp;
+ protected JLabel lblAtr;
+ protected JLabel lblNewLabel;
+ protected JLabel lblNewLabel_1;
+ protected JLabel lblNewLabel_2;
+ protected JPanel cardpanel;
+ protected JPanel readerpanel;
+ protected TitledBorder readerpanel_border;
+ protected TitledBorder cardpanel_border;
+
+
+ public GetHardwareInfoGUI(Container contentPane, Locale locale,
+ URL backgroundImgURL, FontProvider fontProvider,
+ HelpListener helpListener, SwitchFocusListener switchFocusListener) {
+ super(contentPane, locale, Style.advanced, backgroundImgURL, fontProvider,
+ helpListener, switchFocusListener);
+ }
+
+
+ @Override
+ public void showHardwareInfoDialog(final ActionListener hardwareinfolistener, final String backcmd,
+ final String showcardreadername, final String showsmartcardname,
+ final String showsmartcardATR) {
+
+ SwingUtilities.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ headerPanel.removeAll();
+ mainPanel.removeAll();
+ buttonPanel.removeAll();
+
+ backButton.setFont(backButton.getFont().deriveFont(backButton.getFont().getStyle()& ~java.awt.Font.BOLD));
+ backButton.setText(getMessage(BUTTON_BACK));
+ backButton.setActionCommand(backcmd);
+ backButton.addActionListener(hardwareinfolistener);
+ backButton.setEnabled(true);
+
+ //------------------------------------------------------------------------------------
+
+ readerpanel_border = new TitledBorder(null, getMessage(LABEL_CARDREADER), TitledBorder.LEADING, TitledBorder.TOP, null, null);
+ readerpanel_border.setTitleFont(readerpanel_border.getTitleFont().deriveFont(
+ readerpanel_border.getTitleFont().getStyle()
+ & java.awt.Font.BOLD));
+ readerpanel = new JPanel();
+ readerpanel.setBorder(readerpanel_border);
+
+
+
+ cardpanel_border = new TitledBorder(null, getMessage(LABEL_SMARTCARD), TitledBorder.LEADING, TitledBorder.TOP, null, null);
+ cardpanel_border.setTitleFont(cardpanel_border.getTitleFont().deriveFont(
+ cardpanel_border.getTitleFont().getStyle()
+ & java.awt.Font.BOLD));
+ cardpanel = new JPanel();
+ cardpanel.setBorder(cardpanel_border);
+ cardpanel.setFont(cardpanel.getFont().deriveFont(
+ cardpanel.getFont().getStyle()
+ & java.awt.Font.BOLD));
+
+ GroupLayout gl_contentPane = new GroupLayout(mainPanel);
+ gl_contentPane.setHorizontalGroup(
+ gl_contentPane.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addGroup(gl_contentPane.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(gl_contentPane.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addComponent(cardpanel, GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)
+ .addComponent(readerpanel, GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)))
+ );
+ gl_contentPane.setVerticalGroup(
+ gl_contentPane.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addGroup(gl_contentPane.createSequentialGroup()
+ .addComponent(readerpanel, GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE)
+ .addGap(8)
+ .addComponent(cardpanel, GroupLayout.PREFERRED_SIZE, 89, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+
+ lblTyp = new JLabel(getMessage(LABEL_SMARTCARD_TYPE));
+ lblTyp.setFont(lblTyp.getFont().deriveFont(
+ lblTyp.getFont().getStyle()
+ & java.awt.Font.BOLD));
+
+
+ lblAtr = new JLabel(getMessage(LABEL_SMARTCARD_ATR));
+ lblAtr.setFont(lblAtr.getFont().deriveFont(
+ lblAtr.getFont().getStyle()
+ & java.awt.Font.BOLD));
+
+ lblNewLabel_1 = new JLabel(showsmartcardname);
+ lblNewLabel_1.setFont(lblNewLabel_1.getFont().deriveFont(
+ lblNewLabel_1.getFont().getStyle()
+ & ~java.awt.Font.BOLD));
+
+
+ lblNewLabel_2 = new JLabel(makeATRString(showsmartcardATR, 40));
+ lblNewLabel_2.setVerticalAlignment(SwingConstants.CENTER);
+ lblNewLabel_2.setFont(lblNewLabel_2.getFont().deriveFont(
+ lblNewLabel_2.getFont().getStyle()
+ & ~java.awt.Font.BOLD));
+
+ GroupLayout gl_cardpanel = new GroupLayout(cardpanel);
+ gl_cardpanel.setHorizontalGroup(
+ gl_cardpanel.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addGroup(gl_cardpanel.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(gl_cardpanel.createParallelGroup(GroupLayout.Alignment.TRAILING)
+ .addComponent(lblTyp, GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)
+ .addComponent(lblAtr, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addPreferredGap(ComponentPlacement.UNRELATED)
+ .addGroup(gl_cardpanel.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addComponent(lblNewLabel_1, GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE)
+ .addComponent(lblNewLabel_2, GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE)))
+ );
+ gl_cardpanel.setVerticalGroup(
+ gl_cardpanel.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addGroup(gl_cardpanel.createSequentialGroup()
+ .addGroup(gl_cardpanel.createParallelGroup(GroupLayout.Alignment.BASELINE)
+ .addGroup(gl_cardpanel.createSequentialGroup()
+ .addGap(2)
+ .addComponent(lblTyp, GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE))
+ .addComponent(lblNewLabel_1, GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addGroup(gl_cardpanel.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addComponent(lblNewLabel_2, GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)
+ .addGroup(gl_cardpanel.createSequentialGroup()
+ .addComponent(lblAtr, GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
+ .addGap(6)))
+ .addGap(3))
+ );
+ cardpanel.setLayout(gl_cardpanel);
+
+ lblNewLabel = new JLabel(showcardreadername);
+ lblNewLabel.setVerticalAlignment(SwingConstants.CENTER);
+ lblNewLabel.setFont(lblNewLabel.getFont().deriveFont(
+ lblNewLabel.getFont().getStyle()
+ & ~java.awt.Font.BOLD));
+
+ GroupLayout gl_readerpanel = new GroupLayout(readerpanel);
+ gl_readerpanel.setHorizontalGroup(
+ gl_readerpanel.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addGroup(gl_readerpanel.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 276, Short.MAX_VALUE))
+ );
+ gl_readerpanel.setVerticalGroup(
+ gl_readerpanel.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addComponent(lblNewLabel, GroupLayout.DEFAULT_SIZE, 15, Short.MAX_VALUE)
+ );
+ readerpanel.setLayout(gl_readerpanel);
+ mainPanel.setLayout(gl_contentPane);
+
+ //------------------------------------------------------------------------------------
+
+ GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel);
+ buttonPanel.setLayout(buttonPanelLayout);
+
+ GroupLayout.ParallelGroup buttonHorizontal = buttonPanelLayout
+ .createParallelGroup(GroupLayout.Alignment.CENTER)
+ .addComponent(backButton, GroupLayout.PREFERRED_SIZE, buttonSize, GroupLayout.PREFERRED_SIZE);
+
+ GroupLayout.Group buttonVertical = buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
+ .addComponent(backButton);
+
+
+ buttonPanelLayout.setHorizontalGroup(buttonHorizontal);
+ buttonPanelLayout.setVerticalGroup(buttonVertical);
+
+
+ if (windowCloseAdapter != null) {
+ windowCloseAdapter.registerListener(hardwareinfolistener, backcmd);
+ }
+
+ contentPanel.validate();
+
+ resize();
+ }
+ });
+ }
+
+ @Override
+ public void resize() {
+
+ log.debug("Resizing Hardware-Info Applet ...");
+
+ float factor = getResizeFactor();
+
+
+ if (lblTyp != null) {
+ lblTyp.setFont(lblTyp.getFont().deriveFont(
+ (float) ((baseFontSize - 2)* factor)));
+ }
+
+ if (lblAtr != null) {
+ lblAtr.setFont(lblAtr.getFont().deriveFont(
+ (float) ((baseFontSize - 2)* factor)));
+ }
+
+ if (lblNewLabel != null) {
+ lblNewLabel.setFont(lblNewLabel.getFont().deriveFont(
+ (float) ((baseFontSize - 2)* factor)));
+ }
+
+ if (lblNewLabel_1 != null) {
+ lblNewLabel_1.setFont(lblNewLabel_1.getFont().deriveFont(
+ (float) ((baseFontSize - 2)* factor)));
+ }
+
+ if (lblNewLabel_2 != null) {
+ lblNewLabel_2.setFont(lblNewLabel_2.getFont().deriveFont(
+ (float) ((baseFontSize - 2)* factor)));
+ }
+
+ if (cardpanel_border != null) {
+ cardpanel_border.setTitleFont(cardpanel_border.getTitleFont().deriveFont(
+ (float) ((baseFontSize)* factor)));
+ }
+
+ if (readerpanel_border != null) {
+ readerpanel_border.setTitleFont(readerpanel_border.getTitleFont().deriveFont(
+ (float) ((baseFontSize)* factor)));
+ }
+
+ if (backButton != null) {
+
+ backButton.setFont(backButton.getFont().deriveFont(
+ (float) (baseFontSize * factor)));
+
+ }
+
+ super.resize();
+ }
+
+ private String makeATRString(String ATR, int width) {
+
+ String line = new String();
+
+ if (ATR.length() > width) {
+
+ line = line.concat("<html><body>");
+ line = line.concat(ATR.substring(1, width));
+ line = line.concat("<br>");
+ line = line.concat(ATR.substring(width,ATR.length()-1));
+ line = line.concat("</body></html>");
+
+ return line;
+ }
+ else
+ return ATR;
+ }
+
+}
diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUIFacade.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUIFacade.java
new file mode 100644
index 00000000..c121417e
--- /dev/null
+++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetHardwareInfoGUIFacade.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2011 by Graz University of Technology, Austria
+ * MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
+ * initiative of the Federal Chancellery Austria and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+
+package at.gv.egiz.bku.gui;
+
+import java.awt.event.ActionListener;
+
+/**
+*
+* @author Thomas Lenz <thomas.lenz@iaik.tugraz.at>
+*/
+
+public interface GetHardwareInfoGUIFacade extends BKUGUIFacade {
+
+ public static final String LABEL_CARDREADER = "label.hardwareinfo.cardreader";
+ public static final String LABEL_SMARTCARD = "label.hardwareinfo.smartcard";
+ public static final String LABEL_SMARTCARD_TYPE = "label.hardwareinfo.smartcard.type";
+ public static final String LABEL_SMARTCARD_ATR = "label.hardwareinfo.smartcard.atr";
+
+ public void showHardwareInfoDialog(final ActionListener hardwareinfolistener, final String backcmd, final String showcardreadername,
+ final String showsmartcardname, final String showsmartcardATR);
+
+}
diff --git a/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties b/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties
index a5e582a1..eefd451b 100644
--- a/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties
+++ b/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties
@@ -29,6 +29,8 @@ title.activate.success=<html>Success</html>
title.change.success=<html>Success</html>
title.unblock.success=<html>Success</html>
title.identity=<html>Person Identity Link</html>
+title.certificate.save=Save certificate
+title.get.certificate=Save certificates
# removed message.* prefix to reuse keys as help keys
pin.mgmt=<html>{0} PINs available
@@ -69,11 +71,21 @@ label.puk=<html>{0} PUK:</html>
label.new.pin=<html>New {0}:</html>
label.repeat.pin=<html>Confirmation:</html>
+label.hardwareinfo.cardreader = Cardreader
+label.hardwareinfo.smartcard = Smartcard
+label.hardwareinfo.smartcard.type = Type:
+label.hardwareinfo.smartcard.atr = ATR:
+
+file.certificate = Certificate
+
button.activate=Activate
button.change=Change
button.unblock=Unblock
button.verify=Query
+button.qualified.certificate = qualified certificate
+button.simple.certificate = basic certificate
+
help.activation=help.activation
help.pin.mgmt=help.pin.mgmt
diff --git a/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_de.properties b/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_de.properties
index 1935d31b..30a80e6f 100644
--- a/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_de.properties
+++ b/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_de.properties
@@ -35,6 +35,8 @@ identity.button=<html>Abbrechen</html>
identity.firstname=<html>Vorname</html>
identity.dateofbirth=<html>Geburtsdatum</html>
identity.lastname=<html>Nachname</html>
+title.certificate.save=Zertifikat speichern
+title.get.certificate=Zertifikate speichern
# removed message.* prefix to reuse keys as help keys
pin.mgmt=<html>Die Karte verf\u00FCgt \u00FCber {0} PINs</html>
@@ -69,11 +71,21 @@ label.puk=<html>{0} PUK:</html>
label.new.pin=<html>Neue {0}:</html>
label.repeat.pin=<html>Best\u00E4tigung:</html>
+label.hardwareinfo.cardreader = Kartenlesegerät
+label.hardwareinfo.smartcard = Chipkarte
+label.hardwareinfo.smartcard.type = Typ:
+label.hardwareinfo.smartcard.atr = ATR:
+
+file.certificate = Zertifikat
+
button.activate=Aktivieren
button.change=\u00C4ndern
button.unblock=Entsperren
button.verify=Abfragen
+button.qualified.certificate = Qualifiziertes Zertifikat
+button.simple.certificate = Einfaches Zertifikat
+
help.activation=help.activation
help.pin.mgmt=help.pin.mgmt