K - Mapのキー要素の型V - Mapの値要素の型public abstract class MapProperty<K,V> extends ReadOnlyMapProperty<K,V> implements Property<ObservableMap<K,V>>, WritableMapValue<K,V>
ObservableMapをラップするPropertyの完全な実装を提供します。 ObservableObjectValue.get()、MapExpression.getValue()、WritableObjectValue.set(Object)およびsetValue(javafx.collections.ObservableMap)を使用して、MapPropertyの値を取得および設定できます。 Property.bind(javafx.beans.value.ObservableValue)およびProperty.unbind()を使用して、プロパティを一方向にバインドおよびバインド解除できます。 bindBidirectional(Property)およびunbindBidirectional(Property)を使用して、双方向バインディングを作成および削除できます。 ReadOnlyProperty.getBean()およびReadOnlyProperty.getName()を使用して、MapPropertyのコンテキストを読み取ることができます。 ObservableMap、ObservableMapValue、WritableMapValue、ReadOnlyMapProperty、Propertyempty, size| コンストラクタと説明 |
|---|
MapProperty() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void |
bindBidirectional(Property<ObservableMap<K,V>> other)
この
Propertyと別のPropertyの間の双方向バインディングを作成します。 |
void |
setValue(ObservableMap<K,V> v)
ラップされた値を設定します。
|
String |
toString()
この
MapPropertyオブジェクトの文字列表現を返します。 |
void |
unbindBidirectional(Property<ObservableMap<K,V>> other)
この
Propertyと別のPropertyの間の双方向バインディングを削除します。 |
bindContent, bindContentBidirectional, equals, hashCode, unbindContent, unbindContentBidirectionalasString, clear, containsKey, containsValue, emptyProperty, entrySet, get, getSize, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, keySet, mapExpression, put, putAll, remove, size, sizeProperty, valueAt, valueAt, valuesgetBean, getNameaddListener, getValue, removeListeneraddListener, removeListenerget, setgetValueaddListener, removeListenerclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesgetpublic void setValue(ObservableMap<K,V> v)
WritableValue<ObservableMap<K,V>>のsetValuev - 新しい値public void bindBidirectional(Property<ObservableMap<K,V>> other)
Propertyと別のPropertyの間の双方向バインディングを作成します。 双方向バインディングは、一方向バインディングと独立して存在します。 そのため、一方向バインディングを双方向バインディングを使用したプロパティに追加でき、その逆も可能です。 ただし、このプラクティスは推奨されていません。
1つのPropertyに複数の双方向バインディングを使用できます。
JavaFX双方向バインディング実装は、弱いリスナーを使用します。 これは、双方向バインディングによってプロパティがガベージ・コレクションされないことを意味します。
Property<ObservableMap<K,V>>のbindBidirectionalother - 他のPropertypublic void unbindBidirectional(Property<ObservableMap<K,V>> other)
Propertyと別のPropertyの間の双方向バインディングを削除します。 プロパティ間の双方向バインディングが存在しない場合、このメソッドの呼出しは影響しません。 2つ目のプロパティの呼出しによって、バインド解除できます。 このコードが動作します:
property1.bindBirectional(property2);
property2.unbindBidirectional(property1);
Property<ObservableMap<K,V>>のunbindBidirectionalother - 他のPropertypublic String toString()
MapPropertyオブジェクトの文字列表現を返します。toString、クラスReadOnlyMapProperty<K,V>MapPropertyオブジェクトの文字列表現。Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.