Example usage for javafx.scene.control TextInputControl setText

List of usage examples for javafx.scene.control TextInputControl setText

Introduction

In this page you can find the example usage for javafx.scene.control TextInputControl setText.

Prototype

public final void setText(String value) 

Source Link

Usage

From source file:ninja.javafx.smartcsv.fx.validation.ValidationEditorController.java

private void updateTextInputControl(TextInputControl rule, String value, CheckBox ruleEnabled) {
    if (value == null) {
        ruleEnabled.setSelected(false);/*from ww  w .  j  av a2  s  .com*/
    } else {
        ruleEnabled.setSelected(true);
        rule.setText(value);
    }
}

From source file:ninja.javafx.smartcsv.fx.validation.ValidationEditorController.java

private void updateTextInputControl(TextInputControl rule, List<String> values, CheckBox ruleEnabled) {
    if (values == null || values.isEmpty()) {
        ruleEnabled.setSelected(false);/*from   w  w  w  .j  a v a  2 s .  com*/
    } else {
        ruleEnabled.setSelected(true);
        rule.setText(values.stream().collect(joining(", ")));
    }
}

From source file:ninja.javafx.smartcsv.fx.validation.ValidationEditorController.java

private void initTextInputControl(TextInputControl rule, CheckBox ruleEnabled) {
    rule.disableProperty().bind(ruleEnabled.selectedProperty().not());
    ruleEnabled.selectedProperty().addListener((observable, oldValue, newValue) -> {
        if (!newValue) {
            rule.setText("");
        }/*  ww w .  j a v  a2  s.c  om*/
    });
}