public static FloatProperty floatProperty (Property<Float> property)

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.

   FloatProperty 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);

 
Another approach is to convert the FloatProperty to ObjectProperty using asObject() method.

Note: null values in the source property will be interpreted as 0f

Parameters:
property     The source Property

Returns:  A FloatProperty that wraps the Property

Exceptions:
NullPointerException     if property is null

See also:
asObject()

Since:  JavaFX 8.0