- java.lang.Object
-
- javafx.beans.binding.StringExpression
-
- javafx.beans.property.ReadOnlyStringProperty
-
- javafx.beans.property.StringProperty
-
- すべての実装されたインタフェース:
Observable
,Property<String>
,ReadOnlyProperty<String>
,ObservableObjectValue<String>
,ObservableStringValue
,ObservableValue<String>
,WritableObjectValue<String>
,WritableStringValue
,WritableValue<String>
- 直系の既知のサブクラス:
JavaBeanStringProperty
,StringPropertyBase
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
のコンテキストを読み取ることができます。- 導入されたバージョン:
- JavaFX 2.0
- 関連項目:
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の間の双方向バインディングを削除します。-
クラス java.lang.Objectから継承されたメソッド
clone、equals、finalize、getClass、hashCode、notify、notifyAll、wait、wait、wait
-
インタフェースjavafx.beans.Observableから継承されたメソッド
addListener、removeListener
-
インタフェースjavafx.beans.value.ObservableObjectValueから継承されたメソッド
get
-
インタフェースjavafx.beans.value.ObservableValueから継承されたメソッド
addListener、getValue、removeListener
-
インタフェースjavafx.beans.property.ReadOnlyPropertyから継承されたメソッド
getBean, getName
-
クラスjavafx.beans.binding.StringExpressionから継承されたメソッド
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
-
インタフェースjavafx.beans.value.WritableObjectValueから継承されたメソッド
get, set
-
インタフェースjavafx.beans.value.WritableValueから継承されたメソッド
getValue
-
-
-
-
メソッドの詳細
-
setValue
public void setValue(String v)
ラップされた値を設定します。- 定義:
- インタフェース
WritableValue<String>
のsetValue
- パラメータ:
v
- 新しい値
-
bindBidirectional
public void bindBidirectional(Property<String> other)
このProperty
と別のPropertyの間の双方向バインディングを作成します。 双方向バインディングは、一方向バインディングと独立して存在します。 そのため、一方向バインディングを双方向バインディングを使用したプロパティに追加でき、その逆も可能です。 ただし、このプラクティスは推奨されていません。1つのPropertyに複数の双方向バインディングを使用できます。
JavaFX双方向バインディング実装は、弱いリスナーを使用します。 これは、双方向バインディングによってプロパティがガベージ・コレクションされないことを意味します。
- 定義:
- インタフェース
Property<String>
のbindBidirectional
- パラメータ:
other
- 他のProperty
-
bindBidirectional
public void bindBidirectional(Property<?> other, Format format)
このStringProperty
と別の任意のプロパティの間の双方向バインディングを作成します。 変換用のFormat
の実装に依存します。- パラメータ:
other
- 他のProperty
format
- このStringProperty
と他のProperty
間の変換に使用されるFormat
- 例外:
NullPointerException
-other
またはformat
がnull
である場合IllegalArgumentException
-other
がthis
である場合- 導入されたバージョン:
- JavaFX 2.1
-
bindBidirectional
public <T> void bindBidirectional(Property<T> other, StringConverter<T> converter)
このStringProperty
と別の任意のプロパティの間の双方向バインディングを作成します。 変換用のStringConverter
の実装に依存します。- 型パラメータ:
T
- ラップされたObject
の型- パラメータ:
other
- 他のProperty
converter
- このStringProperty
と他のProperty
間の変換に使用されるStringConverter
- 例外:
NullPointerException
-other
またはconverter
がnull
である場合IllegalArgumentException
-other
がthis
である場合- 導入されたバージョン:
- JavaFX 2.1
-
unbindBidirectional
public void unbindBidirectional(Property<String> other)
このProperty
と別のPropertyの間の双方向バインディングを削除します。 プロパティ間の双方向バインディングが存在しない場合、このメソッドの呼出しは影響しません。 2つ目のプロパティの呼出しによって、バインド解除できます。 このコードが動作します:property1.bindBirectional(property2); property2.unbindBidirectional(property1);
- 定義:
- インタフェース
Property<String>
のunbindBidirectional
- パラメータ:
other
- 他のProperty
-
unbindBidirectional
public void unbindBidirectional(Object other)
このProperty
と別のPropertyの間の双方向バインディングを削除します。 プロパティ間の双方向バインディングが存在しない場合、このメソッドの呼出しは影響しません。- パラメータ:
other
- 他のProperty
- 例外:
NullPointerException
-other
がnull
である場合IllegalArgumentException
-other
がthis
である場合- 導入されたバージョン:
- JavaFX 2.1
-
toString
public String toString()
このStringProperty
オブジェクトの文字列表現を返します。- オーバーライド:
toString
、クラス:ReadOnlyStringProperty
- 戻り値:
- この
StringProperty
オブジェクトの文字列表現。
-
-