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");
}
}
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);
}
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;
}
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);
}
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);
}
Aggregations