public final class ReadOnlyJavaBeanDoubleProperty extends ReadOnlyDoublePropertyBase implements ReadOnlyJavaBeanProperty<Number>
ReadOnlyJavaBeanDoubleProperty
provides an adapter between a regular
read only Java Bean property of type double
or Double
and a JavaFX
ReadOnlyDoubleProperty
. It cannot be created directly, but a
ReadOnlyJavaBeanDoublePropertyBuilder
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 ReadOnlyJavaBeanDoubleProperty
will be
aware of changes in the Java Bean. Otherwise it can be notified about
changes by calling fireValueChangedEvent()
.
ReadOnlyDoubleProperty
,
ReadOnlyJavaBeanDoublePropertyBuilder
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 . |
double |
get()
Returns the current value of this
ObservableDoubleValue . |
Object |
getBean()
Returns the
Object that contains this property. |
String |
getName()
Returns the name of this property.
|
addListener, addListener, removeListener, removeListener
asObject, readOnlyDoubleProperty, toString
add, add, add, add, add, divide, divide, divide, divide, divide, doubleExpression, doubleExpression, doubleValue, floatValue, getValue, intValue, longValue, multiply, multiply, multiply, multiply, multiply, negate, subtract, subtract, subtract, subtract, subtract
asString, asString, asString, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, numberExpression
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getValue, removeListener
addListener, removeListener
public double get()
ObservableDoubleValue
.get
in interface ObservableDoubleValue
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<Number>
Object
or null
public String getName()
String
.getName
in interface ReadOnlyProperty<Number>
String
public void fireValueChangedEvent()
InvalidationListeners
and
ChangeListeners
.
This method needs to be called, if the value of this property changes.fireValueChangedEvent
in interface ReadOnlyJavaBeanProperty<Number>
fireValueChangedEvent
in class ReadOnlyDoublePropertyBase
public void dispose()
dispose
in interface ReadOnlyJavaBeanProperty<Number>
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, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.