是否有任何内置函数可以在DoubleProperty和之间创建双向绑定ObjectProperty<Double>?
对于一个方向绑定,这很容易:
public void bindBidirectional(DoubleProperty doubleProperty, ObjectProperty<Double> doubleObjectProperty){
doubleProperty.bind(Bindings.createDoubleBinding(() -> doubleObjectProperty.get(), doubleObjectProperty));
}
Run Code Online (Sandbox Code Playgroud)
但是因为Bindings.createDoubleBinging返回Binding,不是Property我不能用它来进行双向绑定.