モジュール javafx.base
パッケージ javafx.beans.property

クラスStringProperty

    • コンストラクタの詳細

      • StringProperty

        public StringProperty​()
    • メソッドの詳細

      • 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またはformatnullである場合
        IllegalArgumentException - otherthisである場合
        導入されたバージョン:
        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またはconverternullである場合
        IllegalArgumentException - otherthisである場合
        導入されたバージョン:
        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 - othernullである場合
        IllegalArgumentException - otherthisである場合
        導入されたバージョン:
        JavaFX 2.1
      • toString

        public String toString​()
        このStringPropertyオブジェクトの文字列表現を返します。
        オーバーライド:
        toString、クラス: ReadOnlyStringProperty
        戻り値:
        このStringPropertyオブジェクトの文字列表現。