Example usage for javafx.beans.property Property getValue

List of usage examples for javafx.beans.property Property getValue

Introduction

In this page you can find the example usage for javafx.beans.property Property getValue.

Prototype

T getValue();

Source Link

Document

Returns the current value of this ObservableValue

Usage

From source file:de.ks.binding.Binding.java

public void applyControllerContent(Object model) {
    properties.entrySet().forEach(entry -> {
        @SuppressWarnings("unchecked")
        Property<Object> property = (Property<Object>) entry.getValue();
        Object value = property.getValue();
        String valueString = "";
        if (value != null) {
            valueString = String.valueOf(value);
            if (valueString.length() > 100) {
                valueString = valueString.substring(0, 100);
            }//  ww w . j av a2  s .  c o m
        }
        log.debug("For key '{}' setting property {} to {}", entry.getKey().getPropertyPath(), property,
                valueString);
        entry.getKey().setValue(model, value);
    });
}

From source file:net.sourceforge.pmd.util.fxdesigner.util.DesignerUtil.java

/**
 * Binds the underlying property to a source of values. The source property is also initialised using the setter.
 *
 * @param underlying The underlying property
 * @param ui         The property exposed to the user (the one in this wizard)
 * @param setter     Setter to initialise the UI value
 * @param <T>        Type of values
 *//*ww w .  ja  v  a2s.c o  m*/
public static <T> void rewire(Property<T> underlying, ObservableValue<? extends T> ui,
        Consumer<? super T> setter) {
    setter.accept(underlying.getValue());
    rewire(underlying, ui);
}

From source file:uk.ac.bris.cs.scotlandyard.ui.controller.BaseGame.java

private <T> void setAndBind(Property<T> source, Property<T> target) {
    target.setValue(source.getValue());
    target.bindBidirectional(source);
}