protected VisValidableTextField createValidableTextField( String text, InputValidator inputValidator) { VisValidableTextField visTextField = new VisValidableTextField(inputValidator); visTextField.setText(text); visTextField.setStyle(skin.get("default", VisTextField.VisTextFieldStyle.class)); return visTextField; }
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; }
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); }
protected VisValidableTextField createValidableTextField( String text, InputValidator inputValidator, VisTextField.TextFieldFilter textFieldFilter) { VisValidableTextField visTextField = createValidableTextField(text, inputValidator); visTextField.setTextFieldFilter(textFieldFilter); return visTextField; }
public void setGridSize(int gridSize) { gridSizeTextField.setText(gridSize + ""); }