public static VisValidableTextField createValidableTextField(
     String style, InputValidator inputValidator, VisTextField.TextFieldFilter textFieldFilter) {
   VisValidableTextField visTextField = createValidableTextField(style, inputValidator);
   visTextField.setTextFieldFilter(textFieldFilter);
   visTextField.addListener(new CursorListener(CursorManager.TEXT));
   return visTextField;
 }
 public static VisValidableTextField createValidableTextField(
     String style, InputValidator inputValidator) {
   VisValidableTextField visTextField = new VisValidableTextField(inputValidator);
   Skin skin = VisUI.getSkin();
   visTextField.setStyle(skin.get(style, VisTextField.VisTextFieldStyle.class));
   visTextField.addListener(new CursorListener(CursorManager.TEXT));
   return visTextField;
 }
Example #3
0
 private void init() {
   VisLabel lbl = new VisLabel("Grid Size:");
   add(lbl).padRight(4);
   gridSizeTextField = new VisValidableTextField(new Validators.IntegerValidator());
   gridSizeTextField.setStyle(VisUI.getSkin().get("light", VisTextField.VisTextFieldStyle.class));
   // gridSizeTextField.setRightAligned(true);
   gridSizeTextField.addListener(new KeyboardListener(GRID_SIZE_TEXT_FIELD_UPDATED));
   add(gridSizeTextField).width(60);
 }