Returns a FloatProperty that wraps a
javafx.beans.property.Property and is
bidirectionally bound to it.
Changing this property will result in a change of the original property.
This is very useful when bidirectionally binding an ObjectProperty<Float> and a FloatProperty.
Another approach is to convert the FloatProperty to ObjectProperty usingFloatProperty floatProperty = new SimpleFloatProperty(1.0f); ObjectProperty<Float> objectProperty = new SimpleObjectProperty<>(2.0f); // Need to keep the reference as bidirectional binding uses weak references FloatProperty objectAsFloat = FloatProperty.floatProperty(objectProperty); floatProperty.bindBidirectional(objectAsFloat);
asObject() method.
Note: null values in the source property will be interpreted as 0f
property
| The source Property |
FloatProperty that wraps the
Property
NullPointerException
| if property is null |
asObject()
Diagram: FloatProperty