2016-08-26 6 views
1

DoublePropertyObjectProperty<Double>の間に双方向バインドを作成する組み込み関数はありますか?一つの方向についてはObjectProperty <Double>とDoubleProperty間の双方向バインド

それは非常に簡単ですバインディング:

public void bindBidirectional(DoubleProperty doubleProperty, ObjectProperty<Double> doubleObjectProperty){ 
    doubleProperty.bind(Bindings.createDoubleBinding(() -> doubleObjectProperty.get(), doubleObjectProperty)); 
} 

しかしBindings.createDoubleBinging戻りBinding、ないProperty以来、私は双方向の結合のためにそれを使用することはできません。

答えて

3

あなたは私が探していたまさに、

doubleObjectProperty().bindBidirectional(doubleProperty.asObject()); 
+0

感謝を行うことができます:) –

関連する問題