summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java11
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java15
2 files changed, 20 insertions, 6 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 9057b45b..3b77daa5 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
@@ -300,9 +300,13 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
@Override
public void run() {
- String HELP_TOPIC, TITLE, MESSAGE_MGMT, MESSAGE_MGMT_PARAM;
+ String HELP_TOPIC, TITLE, MESSAGE_MGMT, MESSAGE_MGMT_PARAM, PINSIZE;
HELP_TOPIC = HELP_PINMGMT;
+ PINSIZE = (pinSpec.getMaxLength() > pinSpec.getMinLength()) ?
+ pinSpec.getMinLength() + "-" + pinSpec.getMaxLength() :
+ String.valueOf(pinSpec.getMinLength());
+
if (retries < 0) {
if (type == DIALOG.CHANGE) {
log.debug("show change pin dialog");
@@ -313,6 +317,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
TITLE = TITLE_ACTIVATE_PIN;
MESSAGE_MGMT = MESSAGE_ACTIVATE_PIN;
oldPinField = null;
+ PINSIZE = pinSpec.getLocalizedLength();
} else if (type == DIALOG.VERIFY) {
log.debug("show verify pin dialog");
TITLE = TITLE_VERIFY_PIN;
@@ -385,7 +390,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(), pinSpec.getLocalizedLength() }));
+ new Object[] { pinSpec.getLocalizedName(), PINSIZE }));
pinHorizontal = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(pinpadLabel);
@@ -480,7 +485,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[]{pinSpec.getLocalizedLength()}));
+ pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{PINSIZE}));
////////////////////////////////////////////////////////////////
// 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 4f3a8f1e..de9a91b9 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,7 +581,10 @@ 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);
- pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSpec.getLocalizedLength()}));
+ String pinSize = (pinSpec.getMaxLength() > pinSpec.getMinLength()) ?
+ pinSpec.getMinLength() + "-" + pinSpec.getMaxLength() :
+ String.valueOf(pinSpec.getMinLength());
+ pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSize}));
GroupLayout mainPanelLayout = new GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);
@@ -747,8 +750,11 @@ public class BKUGUIImpl implements BKUGUIFacade {
}
String msgPattern = getMessage(MESSAGE_ENTERPIN_PINPAD);
+ String pinSize = (pinSpec.getMaxLength() > pinSpec.getMinLength()) ?
+ pinSpec.getMinLength() + "-" + pinSpec.getMaxLength() :
+ String.valueOf(pinSpec.getMinLength());
String msg = MessageFormat.format(msgPattern, new Object[] {
- pinSpec.getLocalizedName(), pinSpec.getLocalizedLength() });
+ pinSpec.getLocalizedName(), pinSize });
JLabel msgLabel = new JLabel();
msgLabel.setFont(msgLabel.getFont().deriveFont(msgLabel.getFont().getStyle() & ~Font.BOLD));
@@ -897,7 +903,10 @@ 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);
- pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSpec.getLocalizedLength()}));
+ String pinSize = (pinSpec.getMaxLength() > pinSpec.getMinLength()) ?
+ pinSpec.getMinLength() + "-" + pinSpec.getMaxLength() :
+ String.valueOf(pinSpec.getMinLength());
+ pinsizeLabel.setText(MessageFormat.format(pinsizePattern, new Object[]{pinSize}));
GroupLayout mainPanelLayout = new GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);