コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
ファイル: UIGridBox.java プロジェクト: PkayJava/overlap2d-dev
 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);
 }
コード例 #5
0
 protected VisValidableTextField createValidableTextField(
     String text, InputValidator inputValidator, VisTextField.TextFieldFilter textFieldFilter) {
   VisValidableTextField visTextField = createValidableTextField(text, inputValidator);
   visTextField.setTextFieldFilter(textFieldFilter);
   return visTextField;
 }
コード例 #6
0
ファイル: UIGridBox.java プロジェクト: PkayJava/overlap2d-dev
 public void setGridSize(int gridSize) {
   gridSizeTextField.setText(gridSize + "");
 }