Search in sources :

Example 16 with Text

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

the class GenericPINStep method createPUKGui.

private void createPUKGui() {
    Text i1 = new Text();
    getInputInfoUnits().add(i1);
    i1.setText(lang.translationForKey(PUKSTEP_DESCRIPTION));
    PasswordField pukField = new PasswordField(PUK_FIELD);
    pukField.setMaxLength(10);
    pukField.setMinLength(10);
    pukField.setDescription(lang.translationForKey(PUKSTEP_PUK));
    getInputInfoUnits().add(pukField);
    if (wrongPUKFormat) {
        // add note for mistyped PUK
        Text noteWrongEntry = new Text();
        noteWrongEntry.setText(lang.translationForKey(WRONG_ENTRY, "PUK"));
        getInputInfoUnits().add(noteWrongEntry);
    }
    if (failedPUKVerify) {
        // add note for incorrect input
        addVerifyFailed("PUK");
    }
}
Also used : Text(org.openecard.gui.definition.Text) PasswordField(org.openecard.gui.definition.PasswordField)

Example 17 with Text

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

the class GenericPINStep method createErrorGui.

private void createErrorGui() {
    setReversible(false);
    Text errorText = new Text();
    switch(pinState) {
        case PIN_deactivated:
            errorText.setText(lang.translationForKey(ERRORSTEP_DEACTIVATED));
            break;
        case PUK_blocked:
            errorText.setText(lang.translationForKey(ERRORSTEP_PUK_BLOCKED));
            break;
        case UNKNOWN:
            errorText.setText(lang.translationForKey(ERRORSTEP_UNKNOWN));
            break;
    }
    getInputInfoUnits().add(errorText);
}
Also used : Text(org.openecard.gui.definition.Text)

Example 18 with Text

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

the class UnblockPINDialog method createPUKStep.

/**
 * Create the step that asks the user to insert the PUK.
 *
 * @return Step for PUK entry
 */
private Step createPUKStep() {
    Step pukStep = new Step("insert-card", lang.translationForKey(PUKSTEP_TITLE));
    Text i1 = new Text();
    pukStep.getInputInfoUnits().add(i1);
    if (!capturePin) {
        pukStep.setInstantReturn(true);
        i1.setText(lang.translationForKey(PUKSTEP_NATIVE_DESCRIPTION));
    } else {
        i1.setText(lang.translationForKey(PUKSTEP_DESCRIPTION));
        PasswordField pukField = new PasswordField(PUK_FIELD);
        pukField.setDescription(lang.translationForKey(PUKSTEP_PUK));
        pukStep.getInputInfoUnits().add(pukField);
    }
    StepAction pinAction = new PUKStepAction(capturePin, conHandle.getSlotHandle(), dispatcher, pukStep);
    pukStep.setAction(pinAction);
    return pukStep;
}
Also used : StepAction(org.openecard.gui.executor.StepAction) Text(org.openecard.gui.definition.Text) Step(org.openecard.gui.definition.Step) PasswordField(org.openecard.gui.definition.PasswordField)

Example 19 with Text

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

the class CardSelectionStep method addElements.

/**
 * Add the UI elements to the step.
 */
private void addElements() {
    Text description = new Text();
    description.setText(lang.translationForKey("card.selection.message"));
    Radiobox radioBox = new Radiobox("credentialSelectionBox");
    radioBox.setGroupText("Available Credentials");
    for (String cardName : avCardWithName.keySet()) {
        BoxItem item = new BoxItem();
        item.setName(avCardWithName.get(cardName).getRecognitionInfo().getCardType());
        item.setText(cardName);
        radioBox.getBoxItems().add(item);
    }
    getInputInfoUnits().add(description);
    getInputInfoUnits().add(radioBox);
}
Also used : Text(org.openecard.gui.definition.Text) Radiobox(org.openecard.gui.definition.Radiobox) BoxItem(org.openecard.gui.definition.BoxItem)

Example 20 with Text

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

the class PINStep method addSoftwareElements.

private void addSoftwareElements() {
    setResetOnLoad(true);
    Text description = new Text();
    description.setText(LANG_PACE.translationForKey(DESCRIPTION, pinType));
    getInputInfoUnits().add(description);
    PasswordField pinInputField = new PasswordField(PIN_FIELD);
    pinInputField.setDescription(pinType);
    pinInputField.setMinLength(paceMarker.getMinLength());
    pinInputField.setMaxLength(paceMarker.getMaxLength());
    getInputInfoUnits().add(pinInputField);
    Text attemptCount = new Text();
    attemptCount.setText(LANG_PACE.translationForKey("step_pin_retrycount", 3));
    attemptCount.setID(PIN_ATTEMPTS_ID);
    getInputInfoUnits().add(attemptCount);
    Text notice = new Text();
    notice.setText(LANG_EAC.translationForKey(NOTICE, pinType));
    getInputInfoUnits().add(notice);
}
Also used : Text(org.openecard.gui.definition.Text) PasswordField(org.openecard.gui.definition.PasswordField)

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