summaryrefslogtreecommitdiff
path: root/BKUAppletExt/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-03-27 17:33:11 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-03-27 17:33:11 +0000
commit616e06910051528674165319a1d6d161dff5859c (patch)
treec5295e32d65bf5895b2b6c1e9662d5fe358091ce /BKUAppletExt/src/main/java/at/gv/egiz
parent2a1df5e58e44f8d77f34eb80df74e8c0d27caceb (diff)
downloadmocca-616e06910051528674165319a1d6d161dff5859c.tar.gz
mocca-616e06910051528674165319a1d6d161dff5859c.tar.bz2
mocca-616e06910051528674165319a1d6d161dff5859c.zip
1.1-RC6 (pinpad, pinmgmt, secureviewer)
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@323 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUAppletExt/src/main/java/at/gv/egiz')
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java26
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java9
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java2
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java13
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java45
5 files changed, 52 insertions, 43 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 159dd29d..d1ca6c00 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
@@ -118,18 +118,18 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
pinStatusTable.setDefaultRenderer(PINSpec.class, new PINSpecRenderer());
pinStatusTable.setDefaultRenderer(STATUS.class, new PINStatusRenderer(cardmgmtMessages));
pinStatusTable.setTableHeader(null);
-
- pinStatusTable.addMouseMotionListener(new MouseMotionAdapter() {
-
- @Override
- public void mouseMoved(MouseEvent e) {
- if (pinStatusTable.columnAtPoint(e.getPoint()) == 0) {
- pinStatusTable.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
- } else {
- pinStatusTable.setCursor(Cursor.getDefaultCursor());
- }
- }
- });
+ pinStatusTable.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+// pinStatusTable.addMouseMotionListener(new MouseMotionAdapter() {
+//
+// @Override
+// public void mouseMoved(MouseEvent e) {
+// if (pinStatusTable.columnAtPoint(e.getPoint()) == 0) {
+// pinStatusTable.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+// } else {
+// pinStatusTable.setCursor(Cursor.getDefaultCursor());
+// }
+// }
+// });
final JButton activateButton = new JButton();
activateButton.setFont(activateButton.getFont().deriveFont(activateButton.getFont().getStyle() & ~java.awt.Font.BOLD));
@@ -392,7 +392,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
if (pinpad) {
JLabel pinpadLabel = new JLabel();
pinpadLabel.setFont(mgmtLabel.getFont().deriveFont(mgmtLabel.getFont().getStyle() & ~Font.BOLD));
- String pinpadPattern = getMessage(MESSAGE_PINPAD);
+ String pinpadPattern = getMessage(MESSAGE_VERIFYPIN_PINPAD);
pinpadLabel.setText(MessageFormat.format(pinpadPattern,
new Object[] { pinSpec.getLocalizedName(), pinSize }));
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java
index 45313f42..f0cc0a27 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java
@@ -40,13 +40,16 @@ public interface PINManagementGUIFacade extends BKUGUIFacade {
public static final String MESSAGE_ACTIVATE_SUCCESS = "activate.success";
public static final String MESSAGE_CHANGE_SUCCESS = "change.success";
public static final String MESSAGE_PINMGMT = "pin.mgmt";
- public static final String MESSAGE_PINPAD = "pinpad";
- public static final String MESSAGE_CHANGEPIN_PINPAD = "pinpad.change";
+// public static final String MESSAGE_PINPAD = "pinpad";
public static final String MESSAGE_ACTIVATE_PIN = "activate.pin";
public static final String MESSAGE_CHANGE_PIN = "change.pin";
public static final String MESSAGE_VERIFY_PIN = "verify.pin";
public static final String MESSAGE_UNBLOCK_PIN = "unblock.pin";
-
+ public static final String MESSAGE_ACTIVATEPIN_PINPAD = "activate.pinpad";
+ public static final String MESSAGE_CHANGEPIN_PINPAD = "change.pinpad";
+ public static final String MESSAGE_VERIFYPIN_PINPAD = "verify.pinpad";
+ public static final String MESSAGE_UNBLOCKPIN_PINPAD = "unblock.pinpad";
+
public static final String LABEL_OLD_PIN = "label.old.pin";
public static final String LABEL_NEW_PIN = "label.new.pin";
public static final String LABEL_REPEAT_PIN = "label.repeat.pin";
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java
index 4cb84b77..83ff74f2 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java
@@ -22,8 +22,6 @@ import java.awt.Color;
import java.awt.Font;
import java.util.ResourceBundle;
import javax.swing.table.DefaultTableCellRenderer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
*
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java
index b0dd8766..d635b8df 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java
@@ -19,6 +19,7 @@ package at.gv.egiz.bku.smccstal.ext;
import at.gv.egiz.smcc.ChangePINProvider;
import at.gv.egiz.bku.gui.PINManagementGUIFacade;
+import at.gv.egiz.smcc.ccid.CCID;
import at.gv.egiz.smcc.PINProvider;
import at.gv.egiz.smcc.SignatureCard;
@@ -33,13 +34,13 @@ public abstract class ManagementPINProviderFactory {
public static ManagementPINProviderFactory getInstance(SignatureCard forCard,
PINManagementGUIFacade gui) {
-// if (forCard.ifdSupportsFeature(SignatureCard.FEATURE_VERIFY_PIN_DIRECT)) {
-//// forCard.ifdSupportsFeature(SignatureCard.FEATURE_MODIFY_PIN_DIRECT)
-// return new PinpadPINProviderFactory(gui);
-//
-// } else {
+ if (forCard.getReader().hasFeature(CCID.FEATURE_VERIFY_PIN_DIRECT)) {
+// forCard.ifdSupportsFeature(SignatureCard.FEATURE_MODIFY_PIN_DIRECT)
+ return new PinpadPINProviderFactory(gui);
+
+ } else {
return new SoftwarePINProviderFactory(gui);
-// }
+ }
}
public abstract PINProvider getVerifyPINProvider();
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java
index 4176e0a9..a9ad5ef8 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java
@@ -73,23 +73,6 @@ public class PinpadPINProviderFactory extends ManagementPINProviderFactory {
showPinpadPINDialog(retries, spec);
retry = true;
return null;
-
-// gui.showPINDialog(type, spec, (retry) ? retries : -1,
-// this, "exec",
-// this, "back");
-//
-// waitForAction();
-//
-// if ("exec".equals(action)) {
-// gui.showWaitDialog(null);
-// retry = true;
-// return gui.getPin();
-// } else if ("back".equals(action)) {
-// throw new CancelledException();
-// } else {
-// log.error("unsupported command " + action);
-// throw new CancelledException();
-// }
}
/**
@@ -111,14 +94,38 @@ public class PinpadPINProviderFactory extends ManagementPINProviderFactory {
title = BKUGUIFacade.TITLE_RETRY;
message = BKUGUIFacade.MESSAGE_RETRIES;
params = new Object[]{String.valueOf(retries)};
- } else {
- title = BKUGUIFacade.TITLE_SIGN;
+ } else if (type == DIALOG.VERIFY) {
+ title = PINManagementGUIFacade.TITLE_VERIFY_PIN;
message = BKUGUIFacade.MESSAGE_ENTERPIN_PINPAD;
String pinSize = String.valueOf(pinSpec.getMinLength());
if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
pinSize += "-" + pinSpec.getMaxLength();
}
params = new Object[]{pinSpec.getLocalizedName(), pinSize};
+ } else if (type == DIALOG.ACTIVATE) {
+ title = PINManagementGUIFacade.TITLE_ACTIVATE_PIN;
+ message = PINManagementGUIFacade.MESSAGE_ACTIVATEPIN_PINPAD;
+ String pinSize = String.valueOf(pinSpec.getMinLength());
+ if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
+ pinSize += "-" + pinSpec.getMaxLength();
+ }
+ params = new Object[]{pinSpec.getLocalizedName(), pinSize};
+ } else if (type == DIALOG.CHANGE) {
+ title = PINManagementGUIFacade.TITLE_CHANGE_PIN;
+ message = PINManagementGUIFacade.MESSAGE_CHANGEPIN_PINPAD;
+ String pinSize = String.valueOf(pinSpec.getMinLength());
+ if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
+ pinSize += "-" + pinSpec.getMaxLength();
+ }
+ params = new Object[]{pinSpec.getLocalizedName(), pinSize};
+ } else { //if (type == DIALOG.UNBLOCK) {
+ title = PINManagementGUIFacade.TITLE_UNBLOCK_PIN;
+ message = PINManagementGUIFacade.MESSAGE_UNBLOCKPIN_PINPAD;
+ String pinSize = String.valueOf(pinSpec.getMinLength());
+ if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
+ pinSize += "-" + pinSpec.getMaxLength();
+ }
+ params = new Object[]{pinSpec.getLocalizedName(), pinSize};
}
gui.showMessageDialog(title, message, params);
}