-
- All Implemented Interfaces:
-
Observable
,Property<Boolean>
,ReadOnlyProperty<Boolean>
,ObservableBooleanValue
,ObservableValue<Boolean>
,WritableBooleanValue
,WritableValue<Boolean>
public class ReadOnlyBooleanWrapper extends SimpleBooleanProperty
该类提供了一个方便的类来定义只读属性。 它创建两个同步的属性。 一个属性是只读的,可以传递给外部用户。 另一个属性是可读写的,只能在内部使用。- 从以下版本开始:
- JavaFX 2.0
-
-
构造方法摘要
构造方法 Constructor 描述 ReadOnlyBooleanWrapper()
构造函数为ReadOnlyBooleanWrapper
ReadOnlyBooleanWrapper(boolean initialValue)
构造函数为ReadOnlyBooleanWrapper
ReadOnlyBooleanWrapper(Object bean, String name)
构造函数为ReadOnlyBooleanWrapper
ReadOnlyBooleanWrapper(Object bean, String name, boolean initialValue)
构造函数为ReadOnlyBooleanWrapper
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 protected void
fireValueChangedEvent()
发送所有附件的通知InvalidationListeners
和ChangeListeners
。ReadOnlyBooleanProperty
getReadOnlyProperty()
返回readonly属性,该属性与此ReadOnlyBooleanWrapper
同步。-
Methods inherited from class javafx.beans.binding.BooleanExpression
and, asString, booleanExpression, booleanExpression, getValue, isEqualTo, isNotEqualTo, not, or
-
Methods inherited from class javafx.beans.property.BooleanProperty
asObject, bindBidirectional, booleanProperty, setValue, unbindBidirectional
-
Methods inherited from class javafx.beans.property.BooleanPropertyBase
addListener, addListener, bind, get, invalidated, isBound, removeListener, removeListener, set, toString, unbind
-
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.ReadOnlyBooleanProperty
readOnlyBooleanProperty
-
Methods inherited from class javafx.beans.property.SimpleBooleanProperty
getBean, getName
-
Methods inherited from interface javafx.beans.value.WritableValue
getValue
-
-
-
-
构造方法详细信息
-
ReadOnlyBooleanWrapper
public ReadOnlyBooleanWrapper()
构造函数为ReadOnlyBooleanWrapper
-
ReadOnlyBooleanWrapper
public ReadOnlyBooleanWrapper(boolean initialValue)
构造函数为ReadOnlyBooleanWrapper
- 参数
-
initialValue
- 包装值的初始值
-
ReadOnlyBooleanWrapper
public ReadOnlyBooleanWrapper(Object bean, String name)
构造函数为ReadOnlyBooleanWrapper
- 参数
-
bean
- 这个ReadOnlyBooleanProperty
的豆 -
name
- 这个名字ReadOnlyBooleanProperty
-
-
方法详细信息
-
getReadOnlyProperty
public ReadOnlyBooleanProperty getReadOnlyProperty()
返回readonly属性,该属性与此ReadOnlyBooleanWrapper
同步。- 结果
- 只读属性
-
fireValueChangedEvent
protected void fireValueChangedEvent()
发送所有附件的通知InvalidationListeners
和ChangeListeners
。 如果绑定变为无效,则通过调用BooleanPropertyBase.set(boolean)
或绑定属性来手动更改该值时调用此方法。
-
-