Search in sources :

Example 41 with Text

use of org.openecard.gui.definition.Text in project open-ecard by ecsec.

the class GenericPINStep method addRemainingAttempts.

private void addRemainingAttempts() {
    Text txtRemainingAttempts = new Text();
    txtRemainingAttempts.setText(lang.translationForKey(REMAINING_ATTEMPTS, retryCounterPIN));
    getInputInfoUnits().add(txtRemainingAttempts);
}
Also used : Text(org.openecard.gui.definition.Text)

Example 42 with Text

use of org.openecard.gui.definition.Text in project open-ecard by ecsec.

the class GenericPINStep method createPINChangeGui.

private void createPINChangeGui() {
    String pinChangeDescriptionText;
    if (canSuccess) {
        pinChangeDescriptionText = lang.translationForKey(PINSTEP_DESCRIPTION_AFTER_CAN, "PIN");
    } else {
        pinChangeDescriptionText = lang.translationForKey(PINSTEP_DESCRIPTION, "PIN");
    }
    Text pinChangeDescription = new Text(pinChangeDescriptionText);
    getInputInfoUnits().add(pinChangeDescription);
    Text dummy = new Text(" ");
    getInputInfoUnits().add(dummy);
    Text pinText = new Text(lang.translationForKey(PINSTEP_OLDPIN));
    getInputInfoUnits().add(pinText);
    PasswordField oldPIN = new PasswordField(OLD_PIN_FIELD);
    // in case of transport pin
    oldPIN.setMinLength(5);
    oldPIN.setMaxLength(6);
    getInputInfoUnits().add(oldPIN);
    Text newPinText = new Text(lang.translationForKey(PINSTEP_NEWPIN));
    getInputInfoUnits().add(newPinText);
    PasswordField newPIN = new PasswordField(NEW_PIN_FIELD);
    newPIN.setMaxLength(6);
    newPIN.setMinLength(6);
    getInputInfoUnits().add(newPIN);
    Text newPinAgainText = new Text(lang.translationForKey(PINSTEP_NEWPINREPEAT));
    getInputInfoUnits().add(newPinAgainText);
    PasswordField newPINRepeat = new PasswordField(NEW_PIN_REPEAT_FIELD);
    newPINRepeat.setMaxLength(6);
    newPINRepeat.setMinLength(6);
    getInputInfoUnits().add(newPINRepeat);
    if (wrongPINFormat) {
        // add note for mistyped PIN
        Text noteWrongEntry = new Text();
        noteWrongEntry.setText(lang.translationForKey(WRONG_ENTRY, "PIN"));
        getInputInfoUnits().add(noteWrongEntry);
    }
    if (failedPINVerify) {
        // add note for incorrect input
        addVerifyFailed("PIN");
    }
    addRemainingAttempts();
}
Also used : Text(org.openecard.gui.definition.Text) PasswordField(org.openecard.gui.definition.PasswordField)

Example 43 with Text

use of org.openecard.gui.definition.Text in project open-ecard by ecsec.

the class GenericPINStep method createCANGui.

private void createCANGui() {
    Text i1 = new Text();
    i1.setText(lang.translationForKey(CANSTEP_NOTICE));
    getInputInfoUnits().add(i1);
    Text i2 = new Text();
    getInputInfoUnits().add(i2);
    // add description and input fields depending on terminal type
    i2.setText(lang.translationForKey(CANSTEP_DESCRIPTION));
    PasswordField canField = new PasswordField(CAN_FIELD);
    canField.setMinLength(6);
    canField.setMaxLength(6);
    canField.setDescription(lang.translationForKey(CANSTEP_CAN));
    getInputInfoUnits().add(canField);
    if (wrongCANFormat) {
        // add note for mistyped CAN
        Text retryText = new Text();
        retryText.setText(lang.translationForKey(WRONG_CAN));
        getInputInfoUnits().add(retryText);
    }
    if (failedCANVerify) {
        // add note for incorrect input
        addVerifyFailed("CAN");
    }
}
Also used : Text(org.openecard.gui.definition.Text) PasswordField(org.openecard.gui.definition.PasswordField)

Example 44 with Text

use of org.openecard.gui.definition.Text in project open-ecard by ecsec.

the class GenericPINStep method addVerifyFailed.

private void addVerifyFailed(String did) {
    Text incorrectInput = new Text();
    incorrectInput.setText(lang.translationForKey(INCORRECT_INPUT, did));
    getInputInfoUnits().add(incorrectInput);
}
Also used : Text(org.openecard.gui.definition.Text)

Example 45 with Text

use of org.openecard.gui.definition.Text in project open-ecard by ecsec.

the class GenericPINStep method createPINChangeGuiNativ.

private void createPINChangeGuiNativ() {
    String nativPinChangeDescriptionText;
    if (canSuccess) {
        nativPinChangeDescriptionText = lang.translationForKey(PINSTEP_NATIV_CHANGE_DESCRIPTION_AFTER_CAN);
    } else {
        nativPinChangeDescriptionText = lang.translationForKey(PINSTEP_NATIV_CHANGE_DESCRIPTION);
    }
    Text nativPinChangeDescription = new Text(nativPinChangeDescriptionText);
    getInputInfoUnits().add(nativPinChangeDescription);
    if (failedPINVerify || canSuccess) {
        addVerifyFailed("PIN");
    }
    addRemainingAttempts();
}
Also used : Text(org.openecard.gui.definition.Text)

Aggregations

Text (org.openecard.gui.definition.Text)49 Step (org.openecard.gui.definition.Step)19 PasswordField (org.openecard.gui.definition.PasswordField)10 ToggleText (org.openecard.gui.definition.ToggleText)7 UserConsentDescription (org.openecard.gui.definition.UserConsentDescription)7 BoxItem (org.openecard.gui.definition.BoxItem)4 Checkbox (org.openecard.gui.definition.Checkbox)3 PasswordAttributesType (iso.std.iso_iec._24727.tech.schema.PasswordAttributesType)1 DateFormat (java.text.DateFormat)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 CHAT (org.openecard.crypto.common.asn1.cvc.CHAT)1 UserConsent (org.openecard.gui.UserConsent)1 Document (org.openecard.gui.definition.Document)1 Hyperlink (org.openecard.gui.definition.Hyperlink)1 InputInfoUnit (org.openecard.gui.definition.InputInfoUnit)1 Radiobox (org.openecard.gui.definition.Radiobox)1 TextField (org.openecard.gui.definition.TextField)1 BackgroundTask (org.openecard.gui.executor.BackgroundTask)1 ExecutionEngine (org.openecard.gui.executor.ExecutionEngine)1