diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-04-02 16:39:25 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-04-02 16:39:25 +0000 |
commit | daf28c0a423b6c13fa7929c44b86a5df197a0566 (patch) | |
tree | 4a44ccaf0d6fe323fbe2c4299728625db669941f /BKUGuiExt/src | |
parent | c7f2c9f655a987dccc1d32c3aa42ff9926ac1bfb (diff) | |
download | mocca-daf28c0a423b6c13fa7929c44b86a5df197a0566.tar.gz mocca-daf28c0a423b6c13fa7929c44b86a5df197a0566.tar.bz2 mocca-daf28c0a423b6c13fa7929c44b86a5df197a0566.zip |
@Get Certificate: GUI design change
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1061 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUGuiExt/src')
4 files changed, 76 insertions, 42 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 index b6331b49..b5fa0f1e 100644 --- a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUI.java +++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUI.java @@ -33,6 +33,7 @@ import java.util.Locale; import javax.swing.GroupLayout; import javax.swing.JButton; import javax.swing.JFileChooser; +import javax.swing.JLabel; import javax.swing.LayoutStyle; import javax.swing.SwingUtilities; import javax.swing.filechooser.FileFilter; @@ -54,6 +55,9 @@ public class GetCertificateGUI extends CardMgmtGUI implements protected JButton getSimCertButton; protected JButton getQualCertButton; + protected JLabel lblSimcert; + protected JLabel lblQualcert; + public GetCertificateGUI(Container contentPane, Locale locale, URL backgroundImgURL, FontProvider fontProvider, @@ -81,16 +85,26 @@ public class GetCertificateGUI extends CardMgmtGUI implements titleLabel.setText(getMessage(TITLE_GETCERTIFICATE)); + lblSimcert = new JLabel(getMessage(LABEL_SIM_CERT)); + lblSimcert.setFont(lblSimcert.getFont().deriveFont( + lblSimcert.getFont().getStyle() + & ~java.awt.Font.BOLD)); + + lblQualcert = new JLabel(getMessage(LABEL_QUAL_CERT)); + lblQualcert.setFont(lblQualcert.getFont().deriveFont( + lblQualcert.getFont().getStyle() + & ~java.awt.Font.BOLD)); + getSimCertButton = new JButton(); getSimCertButton.setFont(okButton.getFont().deriveFont(okButton.getFont().getStyle()& ~java.awt.Font.BOLD)); - getSimCertButton.setText(getMessage(BUTTON_SIM_CERT)); + getSimCertButton.setText(getMessage(BUTTON_SAVE_AS)); 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.setText(getMessage(BUTTON_SAVE_AS)); getQualCertButton.setActionCommand(showGetQualCert); getQualCertButton.addActionListener(certificateListener); getQualCertButton.setEnabled(true); @@ -104,15 +118,14 @@ public class GetCertificateGUI extends CardMgmtGUI implements updateMethodToRunAtResize("at.gv.egiz.bku.gui.GetCertificateGUI", "renderGetCertificateFrame"); renderGetCertificateFrame(); + + cancelButton.requestFocus(); + contentPanel.validate(); if (windowCloseAdapter != null) { windowCloseAdapter.registerListener(cancelListener, cancelCmd); } - - cancelButton.requestFocus(); - contentPanel.validate(); - resize(); } }); @@ -121,34 +134,37 @@ public class GetCertificateGUI extends CardMgmtGUI implements public void renderGetCertificateFrame() { //--------------------------------------------------------------------------------------------------------- + GroupLayout gl_panel = new GroupLayout(mainPanel); + gl_panel.setHorizontalGroup( + gl_panel.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(gl_panel.createSequentialGroup() + .addContainerGap() + .addGroup(gl_panel.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(lblSimcert) + .addComponent(lblQualcert)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(gl_panel.createParallelGroup(GroupLayout.Alignment.LEADING, false) + .addComponent(getSimCertButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(getQualCertButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + gl_panel.setVerticalGroup( + gl_panel.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(gl_panel.createSequentialGroup() + .addContainerGap() + .addGroup(gl_panel.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(lblSimcert) + .addComponent(getSimCertButton)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(gl_panel.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(getQualCertButton) + .addComponent(lblQualcert)) + .addContainerGap()) + ); - 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, 0, - GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGap(12)) - .addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup() - .addGap(1) - .addComponent(getSimCertButton, 0, - 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); -//--------------------------------------------------------------------------------------------------------- + mainPanel.setLayout(gl_panel); + + //--------------------------------------------------------------------------------------------------------- GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); @@ -172,17 +188,31 @@ public class GetCertificateGUI extends CardMgmtGUI implements float factor = getResizeFactor(); + if (lblSimcert != null) { + + lblSimcert.setFont(lblSimcert.getFont().deriveFont( + (float) ((baseFontSize ) * factor))); + + } + + if (lblQualcert != null) { + + lblQualcert.setFont(lblQualcert.getFont().deriveFont( + (float) ((baseFontSize ) * factor))); + + } + if (getQualCertButton != null) { getQualCertButton.setFont(getQualCertButton.getFont().deriveFont( - (float) (baseFontSize * factor))); + (float) ((baseFontSize ) * factor))); } if (getSimCertButton != null) { getSimCertButton.setFont(getSimCertButton.getFont().deriveFont( - (float) (baseFontSize * factor))); + (float) ((baseFontSize ) * factor))); } 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 index 7a62de2a..aa1b6a70 100644 --- a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUIFacade.java +++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/GetCertificateGUIFacade.java @@ -35,8 +35,9 @@ public interface GetCertificateGUIFacade extends BKUGUIFacade { public static final String HELP_GETCERT = "help.get.certificate"; - public static final String BUTTON_SIM_CERT = "button.simple.certificate"; - public static final String BUTTON_QUAL_CERT = "button.qualified.certificate"; + public static final String LABEL_SIM_CERT = "label.simple.certificate"; + public static final String LABEL_QUAL_CERT = "label.qualified.certificate"; + public static final String BUTTON_SAVE_AS = "button.certificate.saveas"; 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"; 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 b51e2fdd..ca70548e 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 @@ -77,6 +77,9 @@ label.hardwareinfo.smartcard=Smartcard label.hardwareinfo.smartcard.type=<html>Type:</html> label.hardwareinfo.smartcard.atr=<html>ATR:</html> +label.qualified.certificate=Qualified certificate: +label.simple.certificate=Basic certificate: + file.certificate=Certificate button.activate=Activate @@ -84,8 +87,7 @@ button.change=Change button.unblock=Unblock button.verify=Query -button.qualified.certificate=qualified certificate -button.simple.certificate=basic certificate +button.certificate.saveas=Save as 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 7e03282c..41eca69b 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 @@ -77,15 +77,16 @@ label.hardwareinfo.smartcard=Chipkarte label.hardwareinfo.smartcard.type=<html>Typ:</html> label.hardwareinfo.smartcard.atr=<html>ATR:</html> +label.qualified.certificate=Qualifiziertes Zertifikat: +label.simple.certificate=Einfaches Zertifikat: + 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 +button.certificate.saveas=Speichern unter help.activation=help.activation help.pin.mgmt=help.pin.mgmt |