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