T
- ラップされたObject
の型public abstract class ObjectProperty<T> extends ReadOnlyObjectProperty<T> implements Property<T>, WritableObjectValue<T>
Object
をラップするProperty
の完全な実装を提供します。ObservableObjectValue.get()
、ObjectExpression.getValue()
、WritableObjectValue.set(Object)
およびsetValue(Object)
を使用して、ObjectProperty
の値を取得および設定できます。Property.bind(ObservableValue)
およびProperty.unbind()
を使用して、プロパティを一方向にバインドおよびバインド解除できます。bindBidirectional(Property)
およびunbindBidirectional(Property)
を使用して、双方向バインディングを作成および削除できます。ReadOnlyProperty.getBean()
およびReadOnlyProperty.getName()
を使用して、ObjectProperty
のコンテキストを読み取ることができます。コレクション内の変更もレポートするObservableList
、ObservableSet
およびObservableMap
の特化された実装は、ListProperty
、SetProperty
およびMapProperty
を参照してください。ObservableObjectValue
、WritableObjectValue
、ReadOnlyObjectProperty
、Property
コンストラクタと説明 |
---|
ObjectProperty() |
修飾子と型 | メソッドと説明 |
---|---|
void |
bindBidirectional(Property<T> other)
この
Property と別のPropertyの間の双方向バインディングを作成します。 |
void |
setValue(T v)
ラップされた値を設定します。
|
String |
toString()
この
ObjectProperty オブジェクトの文字列表現を返します。 |
void |
unbindBidirectional(Property<T> other)
この
Property と別のPropertyの間の双方向バインディングを削除します。 |
asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpression
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBean, getName
addListener、getValue、removeListener
addListener、removeListener
get, set
getValue
get
public void setValue(T v)
WritableValue<T>
のsetValue
v
- 新しい値public void bindBidirectional(Property<T> other)
Property
と別のPropertyの間の双方向バインディングを作成します。双方向バインディングは、一方向バインディングと独立して存在します。そのため、一方向バインディングを双方向バインディングを使用したプロパティに追加でき、その逆も可能です。ただし、このプラクティスは推奨されていません。
1つのPropertyに複数の双方向バインディングを使用できます。
JavaFX双方向バインディング実装は、弱いリスナーを使用します。これは、双方向バインディングによってプロパティがガベージ・コレクションされないことを意味します。
Property<T>
のbindBidirectional
other
- 他のProperty
public void unbindBidirectional(Property<T> other)
Property
と別のPropertyの間の双方向バインディングを削除します。プロパティ間の双方向バインディングが存在しない場合、このメソッドの呼出しは影響しません。2つ目のプロパティの呼出しによって、バインド解除できます。このコードが動作します:
property1.bindBirectional(property2); property2.unbindBidirectional(property1);
Property<T>
のunbindBidirectional
other
- 他のProperty
public String toString()
ObjectProperty
オブジェクトの文字列表現を返します。toString
、クラス: ReadOnlyObjectProperty<T>
ObjectProperty
オブジェクトの文字列表現。Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.