public final class ReadOnlyJavaBeanBooleanProperty extends ReadOnlyBooleanPropertyBase implements ReadOnlyJavaBeanProperty<Boolean>
ReadOnlyJavaBeanBooleanProperty
provides an adapter between a regular
read only Java Bean property of type boolean
or Boolean
and a JavaFX
ReadOnlyBooleanProperty
. It cannot be created directly, but a
ReadOnlyJavaBeanBooleanPropertyBuilder
has to be used.
As a minimum, the Java Bean must implement a getter for the
property. If the getter of an instance of this class is called, the property of
the Java Bean is returned. If the Java Bean property is bound (i.e. it supports
PropertyChangeListeners), this ReadOnlyJavaBeanBooleanProperty
will be
aware of changes in the Java Bean. Otherwise it can be notified about
changes by calling fireValueChangedEvent()
.
ReadOnlyBooleanProperty
,
ReadOnlyJavaBeanBooleanPropertyBuilder
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Signals to the JavaFX property that it will not be used anymore and any
references can be removed.
|
void |
fireValueChangedEvent()
Sends notifications to all attached
InvalidationListeners and
ChangeListeners . |
boolean |
get()
Returns the current value of this
ObservableBooleanValue . |
Object |
getBean()
Returns the
Object that contains this property. |
String |
getName()
Returns the name of this property.
|
addListener, addListener, removeListener, removeListener
asObject, readOnlyBooleanProperty, toString
and, asString, booleanExpression, booleanExpression, getValue, isEqualTo, isNotEqualTo, not, or
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getValue, removeListener
addListener, removeListener
public boolean get()
ObservableBooleanValue
.get
in interface ObservableBooleanValue
UndeclaredThrowableException
- if calling the getter of the Java Bean
property throws an IllegalAccessException
or an
InvocationTargetException
.public Object getBean()
Object
that contains this property. If this property
is not contained in an Object
, null
is returned.getBean
in interface ReadOnlyProperty<Boolean>
Object
or null
public String getName()
String
.getName
in interface ReadOnlyProperty<Boolean>
String
public void fireValueChangedEvent()
InvalidationListeners
and
ChangeListeners
.
This method needs to be called, if the value of this property changes.fireValueChangedEvent
in interface ReadOnlyJavaBeanProperty<Boolean>
fireValueChangedEvent
in class ReadOnlyBooleanPropertyBase
public void dispose()
dispose
in interface ReadOnlyJavaBeanProperty<Boolean>
Submit 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, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.