public abstract class BooleanProperty extends ReadOnlyBooleanProperty implements Property<Boolean>, WritableBooleanValue
boolean値をラップするPropertyの完全な実装を提供します。
ObservableBooleanValue.get()、BooleanExpression.getValue()、WritableBooleanValue.set(boolean)およびsetValue(Boolean)を使用して、BooleanPropertyの値を取得および設定できます。
Property.bind(ObservableValue)およびProperty.unbind()を使用して、プロパティを一方向にバインドおよびバインド解除できます。 bindBidirectional(Property)およびunbindBidirectional(Property)を使用して、双方向バインディングを作成および削除できます。
ReadOnlyProperty.getBean()およびReadOnlyProperty.getName()を使用して、BooleanPropertyのコンテキストを読み取ることができます。
ノート: null値へのこのプロパティの設定またはバインドにより、プロパティがfalseに設定されます。 setValue(java.lang.Boolean)を参照してください。
ObservableBooleanValue、WritableBooleanValue、ReadOnlyBooleanProperty、Property| コンストラクタと説明 |
|---|
BooleanProperty()
唯一のコンストラクタ
|
| 修飾子と型 | メソッドと説明 |
|---|---|
ObjectProperty<Boolean> |
asObject()
この
BooleanPropertyの値を保持するObjectPropertyを作成します。 |
void |
bindBidirectional(Property<Boolean> other)
この
Propertyと別のPropertyの間の双方向バインディングを作成します。 |
static BooleanProperty |
booleanProperty(Property<Boolean> property)
PropertyをラップするBooleanPropertyを返します。 |
void |
setValue(Boolean v)
ラップされた値を設定します。
|
String |
toString()
この
BooleanPropertyオブジェクトの文字列表現を返します。 |
void |
unbindBidirectional(Property<Boolean> other)
この
Propertyと別のPropertyの間の双方向バインディングを削除します。 |
readOnlyBooleanPropertyand, asString, booleanExpression, booleanExpression, getValue, isEqualTo, isNotEqualTo, not, orclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBean, getNameaddListener, getValue, removeListeneraddListener, removeListenerget, setgetValuegetpublic void setValue(Boolean v)
setValue、インタフェースWritableBooleanValuesetValue、インタフェースWritableValue<Boolean>v - 新しい値public void bindBidirectional(Property<Boolean> other)
Propertyと別のPropertyの間の双方向バインディングを作成します。 双方向バインディングは、一方向バインディングと独立して存在します。 そのため、一方向バインディングを双方向バインディングを使用したプロパティに追加でき、その逆も可能です。 ただし、このプラクティスは推奨されていません。
1つのPropertyに複数の双方向バインディングを使用できます。
JavaFX双方向バインディング実装は、弱いリスナーを使用します。 これは、双方向バインディングによってプロパティがガベージ・コレクションされないことを意味します。
Property<Boolean>のbindBidirectionalother - 他のPropertypublic void unbindBidirectional(Property<Boolean> other)
Propertyと別のPropertyの間の双方向バインディングを削除します。 プロパティ間の双方向バインディングが存在しない場合、このメソッドの呼出しは影響しません。 2つ目のプロパティの呼出しによって、バインド解除できます。 このコードが動作します:
property1.bindBirectional(property2);
property2.unbindBidirectional(property1);
Property<Boolean>のunbindBidirectionalother - 他のPropertypublic String toString()
BooleanPropertyオブジェクトの文字列表現を返します。toString、クラスReadOnlyBooleanPropertyBooleanPropertyオブジェクトの文字列表現。public static BooleanProperty booleanProperty(Property<Boolean> property)
PropertyをラップするBooleanPropertyを返します。 PropertyがすでにBooleanPropertyである場合に返されます。 それ以外の場合、Propertyにバインドされる新しいBooleanPropertyが作成されます。 ノート: ソース・プロパティのnull値がfalseとして解釈されます property - ソースPropertyPropertyをラップするBooleanPropertyNullPointerException - propertyがnullの場合public ObjectProperty<Boolean> asObject()
BooleanPropertyの値を保持するObjectPropertyを作成します。 このBooleanPropertyの値が変更される場合、ObjectPropertyの値が自動的に更新されます。 asObject、クラスReadOnlyBooleanPropertyObjectPropertyCopyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.