-
- All Implemented Interfaces:
-
NumberExpression
,Observable
,Property<Number>
,ReadOnlyProperty<Number>
,ObservableDoubleValue
,ObservableNumberValue
,ObservableValue<Number>
,WritableDoubleValue
,WritableNumberValue
,WritableValue<Number>
public class ReadOnlyDoubleWrapper extends SimpleDoubleProperty
该类提供了一个方便的类来定义只读属性。 它创建两个同步的属性。 一个属性是只读的,可以传递给外部用户。 另一个属性是可读写的,只能在内部使用。- 从以下版本开始:
- JavaFX 2.0
-
-
构造方法摘要
构造方法 Constructor 描述 ReadOnlyDoubleWrapper()
构造函数为ReadOnlyDoubleWrapper
ReadOnlyDoubleWrapper(double initialValue)
构造函数为ReadOnlyDoubleWrapper
ReadOnlyDoubleWrapper(Object bean, String name)
构造函数为ReadOnlyDoubleWrapper
ReadOnlyDoubleWrapper(Object bean, String name, double initialValue)
构造函数为ReadOnlyDoubleWrapper
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 protected void
fireValueChangedEvent()
发送所有附件的通知InvalidationListeners
和ChangeListeners
。ReadOnlyDoubleProperty
getReadOnlyProperty()
返回与此ReadOnlyDoubleWrapper
同步的只读属性。-
Methods inherited from class javafx.beans.binding.DoubleExpression
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
-
Methods inherited from class javafx.beans.property.DoubleProperty
asObject, bindBidirectional, doubleProperty, setValue, unbindBidirectional
-
Methods inherited from class javafx.beans.property.DoublePropertyBase
addListener, addListener, bind, get, invalidated, isBound, removeListener, removeListener, set, toString, unbind
-
Methods inherited from class javafx.beans.binding.NumberExpressionBase
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javafx.beans.value.ObservableValue
getValue
-
Methods inherited from class javafx.beans.property.ReadOnlyDoubleProperty
readOnlyDoubleProperty
-
Methods inherited from class javafx.beans.property.SimpleDoubleProperty
getBean, getName
-
Methods inherited from interface javafx.beans.value.WritableValue
getValue
-
-
-
-
构造方法详细信息
-
ReadOnlyDoubleWrapper
public ReadOnlyDoubleWrapper()
构造函数为ReadOnlyDoubleWrapper
-
ReadOnlyDoubleWrapper
public ReadOnlyDoubleWrapper(double initialValue)
构造函数为ReadOnlyDoubleWrapper
- 参数
-
initialValue
- 包装值的初始值
-
ReadOnlyDoubleWrapper
public ReadOnlyDoubleWrapper(Object bean, String name)
构造函数为ReadOnlyDoubleWrapper
- 参数
-
bean
- 这个ReadOnlyDoubleProperty
的豆 -
name
- 这个名字ReadOnlyDoubleProperty
-
-
方法详细信息
-
getReadOnlyProperty
public ReadOnlyDoubleProperty getReadOnlyProperty()
返回与此ReadOnlyDoubleWrapper
同步的只读属性。- 结果
- 只读属性
-
fireValueChangedEvent
protected void fireValueChangedEvent()
发送所有附件的通知InvalidationListeners
和ChangeListeners
。 通过调用DoublePropertyBase.set(double)
手动或绑定属性的情况下,如果绑定变为无效,则调用此方法。
-
-