Search in sources :

Example 1 with TextField

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

the class InputFieldValidationTest method createNavigator.

private UserConsentNavigator createNavigator(StepAction waitAction) {
    // create step
    UserConsentDescription ucd = new UserConsentDescription("consent title");
    Step s = new Step("step title");
    ucd.getSteps().add(s);
    s.setID("step1");
    s.setAction(waitAction);
    Text desc1 = new Text();
    s.getInputInfoUnits().add(desc1);
    desc1.setText("This test shows a text input field to the user with a minimum length of 4 and a maximum " + "length of 6 to test the input validation.");
    TextField input = new TextField("input1");
    input.setMaxLength(6);
    input.setMinLength(4);
    s.getInputInfoUnits().add(input);
    SwingUserConsent sc = new SwingUserConsent(new SwingDialogWrapper());
    return sc.obtainNavigator(ucd);
}
Also used : UserConsentDescription(org.openecard.gui.definition.UserConsentDescription) TextField(org.openecard.gui.definition.TextField) Text(org.openecard.gui.definition.Text) Step(org.openecard.gui.definition.Step)

Aggregations

Step (org.openecard.gui.definition.Step)1 Text (org.openecard.gui.definition.Text)1 TextField (org.openecard.gui.definition.TextField)1 UserConsentDescription (org.openecard.gui.definition.UserConsentDescription)1