Spec-Zone .ru
спецификации, руководства, описания, API
|
public abstract class BooleanProperty extends ReadOnlyBooleanProperty implements Property<java.lang.Boolean>, WritableBooleanValue
Property
wrapping a
boolean
value.
The value of a BooleanProperty
can be get and set with ObservableBooleanValue.get()
,
BooleanExpression.getValue()
, WritableBooleanValue.set(boolean)
, and setValue(Boolean)
.
A property can be bound and unbound unidirectional with
Property.bind(ObservableValue)
and Property.unbind()
. Bidirectional bindings
can be created and removed with bindBidirectional(Property)
and
unbindBidirectional(Property)
.
The context of a BooleanProperty
can be read with ReadOnlyProperty.getBean()
and ReadOnlyProperty.getName()
.
Note: setting or binding this property to a null value will set the property to "false". See setValue(java.lang.Boolean)
.
Constructor and Description |
---|
BooleanProperty() |
Modifier and Type | Method and Description |
---|---|
ObjectProperty<java.lang.Boolean> |
asObject()
Creates an
ObjectProperty that holds the value
of this BooleanProperty . |
void |
bindBidirectional(Property<java.lang.Boolean> other)
Create a bidirectional binding between this
Property and another
one. |
static BooleanProperty |
booleanProperty(Property<java.lang.Boolean> property)
Returns a
BooleanProperty that wraps a
Property . |
void |
setValue(java.lang.Boolean v)
Set the wrapped value.
|
java.lang.String |
toString()
Returns a string representation of this
BooleanProperty object. |
void |
unbindBidirectional(Property<java.lang.Boolean> other)
Remove a bidirectional binding between this
Property and another
one. |
readOnlyBooleanProperty
and, asString, booleanExpression, booleanExpression, getValue, isEqualTo, isNotEqualTo, not, or
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBean, getName
addListener, getValue, removeListener
addListener, removeListener
get, set
getValue
get
public BooleanProperty()
public void setValue(java.lang.Boolean v)
setValue
in interface WritableBooleanValue
setValue
in interface WritableValue<java.lang.Boolean>
v
- The new valuepublic void bindBidirectional(Property<java.lang.Boolean> other)
Property
and another
one.bindBidirectional
in interface Property<java.lang.Boolean>
other
- the other Property
public void unbindBidirectional(Property<java.lang.Boolean> other)
Property
and another
one.
If no bidirectional binding between the properties exists, calling this
method has no effect.unbindBidirectional
in interface Property<java.lang.Boolean>
other
- the other Property
public java.lang.String toString()
BooleanProperty
object.toString
in class ReadOnlyBooleanProperty
BooleanProperty
object.public static BooleanProperty booleanProperty(Property<java.lang.Boolean> property)
BooleanProperty
that wraps a
Property
. If the
Property
is already a BooleanProperty
, it
will be returned. Otherwise a new
BooleanProperty
is created that is bound to
the Property
.
Note: null values in the source property will be interpreted as "false"property
- The source Property
BooleanProperty
that wraps the
Property
if necessaryjava.lang.NullPointerException
- if value
is null
public ObjectProperty<java.lang.Boolean> asObject()
ObjectProperty
that holds the value
of this BooleanProperty
. If the
value of this BooleanProperty
changes, the value of the
ObjectProperty
will be updated automatically.asObject
in class ReadOnlyBooleanProperty
ObjectProperty
Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. Use is subject to