-
- 型パラメータ:
T- ラップされた値の型
- すべてのスーパー・インタフェース:
Observable,ObservableValue<T>,ReadOnlyProperty<T>,WritableValue<T>
- 既知のすべてのサブインタフェース:
JavaBeanProperty<T>
- 既知のすべての実装クラス:
BooleanProperty,BooleanPropertyBase,DoubleProperty,DoublePropertyBase,FloatProperty,FloatPropertyBase,IntegerProperty,IntegerPropertyBase,JavaBeanBooleanProperty,JavaBeanDoubleProperty,JavaBeanFloatProperty,JavaBeanIntegerProperty,JavaBeanLongProperty,JavaBeanObjectProperty,JavaBeanStringProperty,ListProperty,ListPropertyBase,LongProperty,LongPropertyBase,MapProperty,MapPropertyBase,ObjectProperty,ObjectPropertyBase,ReadOnlyBooleanWrapper,ReadOnlyDoubleWrapper,ReadOnlyFloatWrapper,ReadOnlyIntegerWrapper,ReadOnlyListWrapper,ReadOnlyLongWrapper,ReadOnlyMapWrapper,ReadOnlyObjectWrapper,ReadOnlySetWrapper,ReadOnlyStringWrapper,SetProperty,SetPropertyBase,SimpleBooleanProperty,SimpleDoubleProperty,SimpleFloatProperty,SimpleIntegerProperty,SimpleListProperty,SimpleLongProperty,SimpleMapProperty,SimpleObjectProperty,SimpleSetProperty,SimpleStringProperty,SimpleStyleableBooleanProperty,SimpleStyleableDoubleProperty,SimpleStyleableFloatProperty,SimpleStyleableIntegerProperty,SimpleStyleableLongProperty,SimpleStyleableObjectProperty,SimpleStyleableStringProperty,StringProperty,StringPropertyBase,StyleableBooleanProperty,StyleableDoubleProperty,StyleableFloatProperty,StyleableIntegerProperty,StyleableLongProperty,StyleableObjectProperty,StyleableStringProperty
public interface Property<T> extends ReadOnlyProperty<T>, WritableValue<T>
型に関係なくすべての(書込み可能)プロパティに共通のメソッドを定義する汎用インタフェース。- 導入されたバージョン:
- JavaFX 2.0
-
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 抽象メソッド 修飾子と型 メソッド 説明 voidbind(ObservableValue<? extends T> observable)このPropertyの一方向バインディングを作成します。voidbindBidirectional(Property<T> other)このPropertyと別のPropertyの間の双方向バインディングを作成します。booleanisBound()Propertyがバインドされているかどうかを確認するために使用できます。voidunbind()このPropertyの一方向バインディングを削除します。voidunbindBidirectional(Property<T> other)このPropertyと別のPropertyの間の双方向バインディングを削除します。-
インタフェースjavafx.beans.Observableから継承されたメソッド
addListener、removeListener
-
インタフェースjavafx.beans.value.ObservableValueから継承されたメソッド
addListener、getValue、removeListener
-
インタフェースjavafx.beans.property.ReadOnlyPropertyから継承されたメソッド
getBean, getName
-
インタフェースjavafx.beans.value.WritableValueから継承されたメソッド
getValue, setValue
-
-
-
-
メソッドの詳細
-
bind
void bind(ObservableValue<? extends T> observable)
このPropertyの一方向バインディングを作成します。JavaFXが弱いリスナーを通じて実装されるすべてのバインドの呼出しを持つことに注意してください。 これはバインドされたプロパティがガベージ・コレクションされて更新を停止できることを意味します。
- パラメータ:
observable- このPropertyをバインドするobservable。- 例外:
NullPointerException-observableがnullである場合
-
unbind
void unbind()
このPropertyの一方向バインディングを削除します。Propertyがバインドされていない場合、このメソッドの呼出しは影響しません。
-
isBound
boolean isBound()
Propertyがバインドされているかどうかを確認するために使用できます。- 戻り値:
Propertyがバインドされている場合はtrue、そうでない場合はfalse- 関連項目:
bind(javafx.beans.value.ObservableValue)
-
bindBidirectional
void bindBidirectional(Property<T> other)
このPropertyと別のPropertyの間の双方向バインディングを作成します。 双方向バインディングは、一方向バインディングと独立して存在します。 そのため、一方向バインディングを双方向バインディングを使用したプロパティに追加でき、その逆も可能です。 ただし、このプラクティスは推奨されていません。1つのPropertyに複数の双方向バインディングを使用できます。
JavaFX双方向バインディング実装は、弱いリスナーを使用します。 これは、双方向バインディングによってプロパティがガベージ・コレクションされないことを意味します。
- パラメータ:
other- 他のProperty- 例外:
NullPointerException-otherがnullである場合IllegalArgumentException-otherがthisである場合
-
unbindBidirectional
void unbindBidirectional(Property<T> other)
このPropertyと別のPropertyの間の双方向バインディングを削除します。 プロパティ間の双方向バインディングが存在しない場合、このメソッドの呼出しは影響しません。 2つ目のプロパティの呼出しによって、バインド解除できます。 このコードが動作します:property1.bindBirectional(property2); property2.unbindBidirectional(property1);- パラメータ:
other- 他のProperty- 例外:
NullPointerException-otherがnullである場合IllegalArgumentException-otherがthisである場合
-
-