-
- All Implemented Interfaces:
-
NumberExpression
,Observable
,Property<Number>
,ReadOnlyProperty<Number>
,ObservableFloatValue
,ObservableNumberValue
,ObservableValue<Number>
,WritableFloatValue
,WritableNumberValue
,WritableValue<Number>
public class ReadOnlyFloatWrapper extends SimpleFloatProperty
该类提供了一个方便的类来定义只读属性。 它创建两个同步的属性。 一个属性是只读的,可以传递给外部用户。 另一个属性是可读写的,只能在内部使用。- 从以下版本开始:
- JavaFX 2.0
-
-
构造方法摘要
构造方法 Constructor 描述 ReadOnlyFloatWrapper()
构造函数为ReadOnlyFloatWrapper
ReadOnlyFloatWrapper(float initialValue)
构造函数为ReadOnlyFloatWrapper
ReadOnlyFloatWrapper(Object bean, String name)
构造函数为ReadOnlyFloatWrapper
ReadOnlyFloatWrapper(Object bean, String name, float initialValue)
构造函数为ReadOnlyFloatWrapper
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 protected void
fireValueChangedEvent()
发送所有附件的通知InvalidationListeners
和ChangeListeners
。ReadOnlyFloatProperty
getReadOnlyProperty()
返回readonly属性,该属性与此ReadOnlyFloatWrapper
同步。-
Methods inherited from class javafx.beans.binding.FloatExpression
add, add, add, add, divide, divide, divide, divide, doubleValue, floatExpression, floatExpression, floatValue, getValue, intValue, longValue, multiply, multiply, multiply, multiply, negate, subtract, subtract, subtract, subtract
-
Methods inherited from class javafx.beans.property.FloatProperty
asObject, bindBidirectional, floatProperty, setValue, unbindBidirectional
-
Methods inherited from class javafx.beans.property.FloatPropertyBase
addListener, addListener, bind, get, invalidated, isBound, removeListener, removeListener, set, toString, unbind
-
Methods inherited from class javafx.beans.binding.NumberExpressionBase
add, asString, asString, asString, divide, 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, multiply, numberExpression, subtract
-
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.ReadOnlyFloatProperty
readOnlyFloatProperty
-
Methods inherited from class javafx.beans.property.SimpleFloatProperty
getBean, getName
-
Methods inherited from interface javafx.beans.value.WritableValue
getValue
-
-
-
-
构造方法详细信息
-
ReadOnlyFloatWrapper
public ReadOnlyFloatWrapper()
构造函数为ReadOnlyFloatWrapper
-
ReadOnlyFloatWrapper
public ReadOnlyFloatWrapper(float initialValue)
构造函数为ReadOnlyFloatWrapper
- 参数
-
initialValue
- 包装值的初始值
-
ReadOnlyFloatWrapper
public ReadOnlyFloatWrapper(Object bean, String name)
构造函数为ReadOnlyFloatWrapper
- 参数
-
bean
- 这个ReadOnlyFloatProperty
的豆 -
name
- 这个名字ReadOnlyFloatProperty
-
-
方法详细信息
-
getReadOnlyProperty
public ReadOnlyFloatProperty getReadOnlyProperty()
返回readonly属性,该属性与此ReadOnlyFloatWrapper
同步。- 结果
- 只读属性
-
fireValueChangedEvent
protected void fireValueChangedEvent()
发送所有附件的通知InvalidationListeners
和ChangeListeners
。 通过调用FloatPropertyBase.set(float)
手动或绑定属性的情况下,如果绑定变为无效,则调用此方法。
-
-