E
- Set
要素の型public abstract class SetProperty<E> extends ReadOnlySetProperty<E> implements Property<ObservableSet<E>>, WritableSetValue<E>
ObservableSet
をラップするProperty
の完全な実装を提供します。ObservableObjectValue.get()
、SetExpression.getValue()
、WritableObjectValue.set(Object)
およびsetValue(ObservableSet)
を使用して、SetProperty
の値を取得および設定できます。Property.bind(javafx.beans.value.ObservableValue)
およびProperty.unbind()
を使用して、プロパティを一方向にバインドおよびバインド解除できます。bindBidirectional(Property)
およびunbindBidirectional(Property)
を使用して、双方向バインディングを作成および削除できます。ReadOnlyProperty.getBean()
およびReadOnlyProperty.getName()
を使用して、SetProperty
のコンテキストを読み取ることができます。ObservableSet
、ObservableSetValue
、WritableSetValue
、ReadOnlySetProperty
、Property
empty, size
コンストラクタと説明 |
---|
SetProperty() |
修飾子と型 | メソッドと説明 |
---|---|
void |
bindBidirectional(Property<ObservableSet<E>> other)
この
Property と別のPropertyの間の双方向バインディングを作成します。 |
void |
setValue(ObservableSet<E> v)
ラップされた値を設定します。
|
String |
toString()
この
SetProperty オブジェクトの文字列表現を返します。 |
void |
unbindBidirectional(Property<ObservableSet<E>> other)
この
Property と別のPropertyの間の双方向バインディングを削除します。 |
bindContent, bindContentBidirectional, equals, hashCode, unbindContent, unbindContentBidirectional
add, addAll, asString, clear, contains, containsAll, emptyProperty, getSize, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, iterator, remove, removeAll, retainAll, setExpression, size, sizeProperty, toArray, toArray
getBean, getName
addListener、getValue、removeListener
addListener、removeListener
get, set
getValue
addListener、removeListener
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray
parallelStream, removeIf, stream
get
public void setValue(ObservableSet<E> v)
WritableValue<ObservableSet<E>>
のsetValue
v
- 新しい値public void bindBidirectional(Property<ObservableSet<E>> other)
Property
と別のPropertyの間の双方向バインディングを作成します。双方向バインディングは、一方向バインディングと独立して存在します。そのため、一方向バインディングを双方向バインディングを使用したプロパティに追加でき、その逆も可能です。ただし、このプラクティスは推奨されていません。
1つのPropertyに複数の双方向バインディングを使用できます。
JavaFX双方向バインディング実装は、弱いリスナーを使用します。これは、双方向バインディングによってプロパティがガベージ・コレクションされないことを意味します。
Property<ObservableSet<E>>
のbindBidirectional
other
- 他のProperty
public void unbindBidirectional(Property<ObservableSet<E>> other)
Property
と別のPropertyの間の双方向バインディングを削除します。プロパティ間の双方向バインディングが存在しない場合、このメソッドの呼出しは影響しません。2つ目のプロパティの呼出しによって、バインド解除できます。このコードが動作します:
property1.bindBirectional(property2); property2.unbindBidirectional(property1);
Property<ObservableSet<E>>
のunbindBidirectional
other
- 他のProperty
public String toString()
SetProperty
オブジェクトの文字列表現を返します。toString
、クラス: ReadOnlySetProperty<E>
SetProperty
オブジェクトの文字列表現。Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.