Package javafx.scene.control

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


        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


        this.formatProvider = formatProvider;
    }

    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(formatProvider.getFormat(controller.getElement()), textBox.getText());
View Full Code Here

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

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

    }

    public DisposableNode createNode(final PropertyElementController<T> controller) {
        final TextField textBox = new TextField();
        final InvalidationListener 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);
View Full Code Here

    public DisposableNode createNode(final PropertyElementController<T> controller) {
        final TextField textBox = new TextField();
        final InvalidationListener 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);
        textBox.promptTextProperty().bind(controller.getPromptText());
View Full Code Here

        textBox.promptTextProperty().bind(controller.getPromptText());

        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 ChangeListener textPropertyListener = new ChangeListener<String>() {
            public void changed(ObservableValue<? extends String> observableValue, String s, String s1) {
                controller.setValue(s1);
            }
        };
        text.textProperty().addListener(textPropertyListener);
        final ChangeListener<String> controllerListener = new ChangeListener<String>() {
            public void changed(ObservableValue<? extends String> observableValue, String s, String s1) {
                if (s1 != null) {
                    if (!text.getText().equals(s1)) {
                        text.setText(s1);
View Full Code Here

        } catch (Exception e) {
        }

        return new DisposableNodeWrapper(text, new Callback<Node, Void>() {
            public Void call(Node node) {
                text.textProperty().removeListener(textPropertyListener);
                controller.removeListener(controllerListener);
                return null;
            }
        });
    }
View Full Code Here

    }

    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);
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.