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