Example usage for javafx.beans.value ObservableStringValue get

List of usage examples for javafx.beans.value ObservableStringValue get

Introduction

In this page you can find the example usage for javafx.beans.value ObservableStringValue get.

Prototype

T get();

Source Link

Document

Returns the current value of this ObservableObjectValue .

Usage

From source file:gov.va.isaac.gui.util.ErrorMarkerUtils.java

/**
 * @deprecated Use {@link #setupErrorMarker(Control, StackPane, ValidBooleanBinding)} instead
 *///from  ww  w  .j  av a  2 s.  c o  m
public static Node setupErrorMarker(Control initialControl, StackPane stackPane,
        ObservableStringValue reasonWhyControlInvalid) {
    ValidBooleanBinding binding = new ValidBooleanBinding() {
        {
            bind(reasonWhyControlInvalid);
        }

        @Override
        protected boolean computeValue() {
            if (StringUtils.isNotBlank(reasonWhyControlInvalid.get())) {
                setInvalidReason(reasonWhyControlInvalid.get());
                return false;
            } else {
                clearInvalidReason();
                return true;
            }
        }
    };

    return setupErrorMarker(initialControl, stackPane, binding);
}