public abstract class BooleanProperty extends ReadOnlyBooleanProperty implements Property<Boolean>, WritableBooleanValue
A property can be bound and unbound unidirectional with
Property.unbind(). Bidirectional bindings
can be created and removed with
Note: setting or binding this property to a null value will set the property to "false". See
|Constructor and Description|
|Modifier and Type||Method and Description|
Create a bidirectional binding between this
Set the wrapped value.
Returns a string representation of this
Remove a bidirectional binding between this
and, asString, booleanExpression, booleanExpression, getValue, isEqualTo, isNotEqualTo, not, or
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getValue, removeListener
public void setValue(Boolean v)
Propertyand 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.
Propertyand 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:
public String toString()
public static BooleanProperty booleanProperty(Property<Boolean> property)
BooleanPropertythat wraps a
Property. If the
Propertyis already a
BooleanProperty, it will be returned. Otherwise a new
BooleanPropertyis created that is bound to the
Property. Note: null values in the source property will be interpreted as "false"
property- The source
BooleanPropertythat wraps the
public ObjectProperty<Boolean> asObject()
ObjectPropertythat holds the value of this
BooleanProperty. If the value of this
BooleanPropertychanges, the value of the
ObjectPropertywill be updated automatically.
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.