T - the type of the wrapped valuepublic interface Property<T> extends ReadOnlyProperty<T>, WritableValue<T>
| Modifier and Type | Method and Description |
|---|---|
void |
bind(ObservableValue<? extends T> observable)
Create a unidirection binding for this
Property. |
void |
bindBidirectional(Property<T> other)
Create a bidirectional binding between this
Property and another
one. |
boolean |
isBound()
Can be used to check, if a
Property is bound. |
void |
unbind()
Remove the unidirectional binding for this
Property. |
void |
unbindBidirectional(Property<T> other)
Remove a bidirectional binding between this
Property and another
one. |
getBean, getNameaddListener, getValue, removeListeneraddListener, removeListenergetValue, setValuevoid bind(ObservableValue<? extends T> observable)
Property.
Note that JavaFX has all the bind calls implemented through weak listeners. This means the bound property can be garbage collected and stopped from being updated.
observable - The observable this Property should be bound to.NullPointerException - if observable is nullvoid unbind()
Property.
If the Property is not bound, calling this method has no effect.bind(javafx.beans.value.ObservableValue)boolean isBound()
Property is bound.true if the Property is bound, false
otherwisebind(javafx.beans.value.ObservableValue)void bindBidirectional(Property<T> other)
Property and another
one.
Bidirectional bindings exists independently of unidirectional bindings. So it is possible to
add unidirectional binding to a property with bidirectional binding and vice-versa. However, this practice is
discouraged.
It is possible to have multiple bidirectional bindings of one Property.
JavaFX bidirectional binding implementation use weak listeners. This means bidirectional binding does not prevent properties from being garbage collected.
other - the other PropertyNullPointerException - if other is nullIllegalArgumentException - if other is thisvoid unbindBidirectional(Property<T> other)
Property and another
one.
If no bidirectional binding between the properties exists, calling this
method has no effect.
It is possible to unbind by a call on the second property. This code will work:
property1.bindBirectional(property2);
property2.unbindBidirectional(property1);
other - the other PropertyNullPointerException - if other is nullIllegalArgumentException - if other is thisSubmit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2019, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.