Package javafx.scene.control

Examples of javafx.scene.control.TextField.textProperty()


    public DisposableNode createNode(final PropertyElementController<T> controller) {
        final TextField textBox = new TextField();
        final ChangeListener textBoxListener = createTextBoxListener(controller, textBox);
        textBox.textProperty().addListener(textBoxListener);
        if (controller.getValue() != null) {
            textBox.textProperty().setValue(formatProvider.getFormat(controller.getElement()).format(controller.getValue()));
        }
        final ChangeListener controllerListener = createControllerListener(textBox, controller);
        controller.addListener(controllerListener);
        return new DisposableNodeWrapper(textBox, new Callback<Node, Void>() {
            public Void call(Node node) {
View Full Code Here


        final ChangeListener controllerListener = createControllerListener(textBox, controller);
        controller.addListener(controllerListener);
        return new DisposableNodeWrapper(textBox, new Callback<Node, Void>() {
            public Void call(Node node) {
                controller.removeListener(controllerListener);
                textBox.textProperty().removeListener(textBoxListener);
                return null;
            }
        });
    }
View Full Code Here

        final TextField text = new TextField();
        String value = controller.getValue();
        if (value != null) {
            text.setText(value);
        }
        text.textProperty().addListener(new ChangeListener<String>() {
            public void changed(ObservableValue<? extends String> observableValue, String s, String s1) {
                controller.setValue(s1);
            }
        });
        controller.addListener(new ChangeListener<String>() {
View Full Code Here

  protected ObjectProperty<T> numberProperty = new SimpleObjectProperty<T>();

  public Node createNode(final PropertyElementController<T> controller) {
    final TextField textBox = new TextField();
    textBox.textProperty().addListener(new ChangeListener<String>() {

      public void changed(ObservableValue<? extends String> observableValue, String s, String s1) {
        if (textBox.getText().trim().length() > 0) {
          try {
            Number parsed = parse(textBox.getText());
View Full Code Here

          }
        }
      }
    });
    if (controller.getValue() != null) {
      textBox.textProperty().setValue(getFormat().format(controller.getValue()));
    }
    controller.addListener(new ChangeListener() {
      public void changed(ObservableValue observableValue, Object o, Object o1) {
        textBox.textProperty().setValue(getFormat().format(controller.getValue()));
      }
View Full Code Here

    if (controller.getValue() != null) {
      textBox.textProperty().setValue(getFormat().format(controller.getValue()));
    }
    controller.addListener(new ChangeListener() {
      public void changed(ObservableValue observableValue, Object o, Object o1) {
        textBox.textProperty().setValue(getFormat().format(controller.getValue()));
      }
    });
    numberProperty.addListener(new ChangeListener<T>() {
      public void changed(ObservableValue<? extends T> observableValue, T t, T t1) {
        controller.setValue(t1);
View Full Code Here

*/
public class TextFieldFactory implements Callback<Void, FXFormNode> {

    public FXFormNode call(Void aVoid) {
        final TextField textField = new TextField();
        return new FXFormNodeWrapper(textField, textField.textProperty());
    }

}
View Full Code Here

            } else if (item instanceof TextFilter) {
                TextFilter f = (TextFilter) item;
                TextField textField = new TextField();
                textField.setPromptText("enter filter string");
                textField.textProperty().bindBidirectional(f.textProperty());
                Platform.runLater(() -> {
                    setGraphic(textField);
                });

            } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.