summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-08-13 09:11:09 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-08-13 09:11:09 +0000
commit2429c7e98cb9e47e36dc5ff07fd10bd18cc999bc (patch)
tree3963acc74b652727a220ed0f81bcab8e12981f9c
parent497f6336cc96cd3b2b4cd760774ec4c2ed892df2 (diff)
downloadmocca-2429c7e98cb9e47e36dc5ff07fd10bd18cc999bc.tar.gz
mocca-2429c7e98cb9e47e36dc5ff07fd10bd18cc999bc.tar.bz2
mocca-2429c7e98cb9e47e36dc5ff07fd10bd18cc999bc.zip
[#436] resolve "#PIN digits" message via message resource bundle
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@419 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java15
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java19
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/DefaultHelpListener.java7
3 files changed, 9 insertions, 32 deletions
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java
index d1ca6c00..9057b45b 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java
@@ -259,11 +259,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
} else {
params[0] = pinSpec.getLocalizedName();
}
- String pinSize = String.valueOf(pinSpec.getMinLength());
- if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
- pinSize += "-" + pinSpec.getMaxLength();
- }
- params[1] = pinSize;
+ params[1] = pinSpec.getLocalizedLength();
if (type == DIALOG.CHANGE) {
log.debug("show change pin dialog");
title = TITLE_CHANGE_PIN;
@@ -361,11 +357,6 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
mgmtLabel.setText(getMessage(TITLE));
}
- String pinSize = String.valueOf(pinSpec.getMinLength());
- if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
- pinSize += "-" + pinSpec.getMaxLength();
- }
-
////////////////////////////////////////////////////////////////
// COMMON LAYOUT SECTION
////////////////////////////////////////////////////////////////
@@ -394,7 +385,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
pinpadLabel.setFont(mgmtLabel.getFont().deriveFont(mgmtLabel.getFont().getStyle() & ~Font.BOLD));
String pinpadPattern = getMessage(MESSAGE_VERIFYPIN_PINPAD);
pinpadLabel.setText(MessageFormat.format(pinpadPattern,
- new Object[] { pinSpec.getLocalizedName(), pinSize }));
+ new Object[] { pinSpec.getLocalizedName(), pinSpec.getLocalizedLength() }));
pinHorizontal = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(pinpadLabel);
@@ -489,7 +480,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
JLabel pinsizeLabel = new JLabel();
pinsizeLabel.setFont(pinsizeLabel.getFont().deriveFont(pinsizeLabel.getFont().getStyle() & ~Font.BOLD, pinsizeLabel.getFont().getSize()-2));
String pinsizePattern = getMessage(LABEL_PINSIZE);
- pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSize}));
+ pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSpec.getLocalizedLength()}));
////////////////////////////////////////////////////////////////
// NON-PINPAD SPECIFIC LAYOUT SECTION
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
index 16297218..4f3a8f1e 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
@@ -581,11 +581,7 @@ public class BKUGUIImpl implements BKUGUIFacade {
JLabel pinsizeLabel = new JLabel();
pinsizeLabel.setFont(pinsizeLabel.getFont().deriveFont(pinsizeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, pinsizeLabel.getFont().getSize()-2));
String pinsizePattern = getMessage(LABEL_PINSIZE);
- String pinSize = String.valueOf(pinSpec.getMinLength());
- if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
- pinSize += "-" + pinSpec.getMaxLength();
- }
- pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSize}));
+ pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSpec.getLocalizedLength()}));
GroupLayout mainPanelLayout = new GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);
@@ -750,14 +746,9 @@ public class BKUGUIImpl implements BKUGUIFacade {
helpListener.setHelpTopic(HELP_RETRY);
}
- String pinSize = String.valueOf(pinSpec.getMinLength());
- if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
- pinSize += "-" + pinSpec.getMaxLength();
- }
-
String msgPattern = getMessage(MESSAGE_ENTERPIN_PINPAD);
String msg = MessageFormat.format(msgPattern, new Object[] {
- pinSpec.getLocalizedName(), pinSize });
+ pinSpec.getLocalizedName(), pinSpec.getLocalizedLength() });
JLabel msgLabel = new JLabel();
msgLabel.setFont(msgLabel.getFont().deriveFont(msgLabel.getFont().getStyle() & ~Font.BOLD));
@@ -906,11 +897,7 @@ public class BKUGUIImpl implements BKUGUIFacade {
JLabel pinsizeLabel = new JLabel();
pinsizeLabel.setFont(pinsizeLabel.getFont().deriveFont(pinsizeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, pinsizeLabel.getFont().getSize()-2));
String pinsizePattern = getMessage(LABEL_PINSIZE);
- String pinSize = String.valueOf(pinSpec.getMinLength());
- if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
- pinSize += "-" + pinSpec.getMaxLength();
- }
- pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSize}));
+ pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSpec.getLocalizedLength()}));
GroupLayout mainPanelLayout = new GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/DefaultHelpListener.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/DefaultHelpListener.java
index c8594fe1..032c8fe5 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/DefaultHelpListener.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/DefaultHelpListener.java
@@ -60,8 +60,7 @@ public class DefaultHelpListener extends AbstractHelpListener {
* @param helpTopic ignored
*/
@Override
- public void showDocument(final URL helpURL, final String helpTopic) {
-// try {
+ public void showDocument(final URL helpURL, final String helpTopic) {
log.debug("schedule help dialog");
SwingUtilities.invokeLater(new Runnable() {
@@ -72,9 +71,9 @@ public class DefaultHelpListener extends AbstractHelpListener {
log.debug("show help dialog");
if (ctx == null) {
- HelpViewer.showHelpDialog(helpURL, messages); // helpTopic, messages);
+ HelpViewer.showHelpDialog(helpURL, messages);
} else {
- HelpViewer.showHelpDialog(ctx, helpURL, messages); //helpTopic, messages);
+ HelpViewer.showHelpDialog(ctx, helpURL, messages);
}
}
});