List of usage examples for javafx.beans.property Property isBound
boolean isBound();
From source file:de.ks.binding.Binding.java
protected void resetProperties() { properties.entrySet().forEach(entry -> { @SuppressWarnings("unchecked") Property<Object> property = (Property<Object>) entry.getValue(); if (!property.isBound()) { Object defaultValue = getDefaultValue(property); property.setValue(defaultValue); }/*from w ww.j a va 2s. c o m*/ }); }
From source file:de.ks.binding.Binding.java
@SuppressWarnings("unchecked") protected void applyModelToProperties(Object model) { properties.entrySet().forEach(entry -> { Object value = entry.getKey().getValue(model); @SuppressWarnings("unchecked") Property<Object> property = (Property<Object>) entry.getValue(); Pair<Function, Function> converter = converters.get(property); if (converter != null && value != null) { value = converter.getKey().apply(value); }//from w ww.j ava 2 s . c om if (!property.isBound()) { property.setValue(value); } }); }