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