-
- All Implemented Interfaces:
-
Observable
,Property<String>
,ReadOnlyProperty<String>
,ObservableObjectValue<String>
,ObservableStringValue
,ObservableValue<String>
,WritableObjectValue<String>
,WritableStringValue
,WritableValue<String>
public class ReadOnlyStringWrapper extends SimpleStringProperty
该类提供了一个方便的类来定义只读属性。 它创建两个同步的属性。 一个属性是只读的,可以传递给外部用户。 另一个属性是可读写的,只能在内部使用。- 从以下版本开始:
- JavaFX 2.0
-
-
构造方法摘要
构造方法 Constructor 描述 ReadOnlyStringWrapper()
构造函数为ReadOnlyStringWrapper
ReadOnlyStringWrapper(Object bean, String name)
构造函数为ReadOnlyStringWrapper
ReadOnlyStringWrapper(Object bean, String name, String initialValue)
构造函数为ReadOnlyStringWrapper
ReadOnlyStringWrapper(String initialValue)
构造函数为ReadOnlyStringWrapper
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 protected void
fireValueChangedEvent()
发送所有附件的通知InvalidationListeners
和ChangeListeners
。ReadOnlyStringProperty
getReadOnlyProperty()
返回readonly属性,该属性与此ReadOnlyStringWrapper
同步。-
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.SimpleStringProperty
getBean, getName
-
Methods inherited from class javafx.beans.binding.StringExpression
concat, getValue, getValueSafe, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, isEmpty, isEqualTo, isEqualTo, isEqualToIgnoreCase, isEqualToIgnoreCase, isNotEmpty, isNotEqualTo, isNotEqualTo, isNotEqualToIgnoreCase, isNotEqualToIgnoreCase, isNotNull, isNull, length, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, stringExpression
-
Methods inherited from class javafx.beans.property.StringProperty
bindBidirectional, bindBidirectional, bindBidirectional, setValue, unbindBidirectional, unbindBidirectional
-
Methods inherited from class javafx.beans.property.StringPropertyBase
addListener, addListener, bind, get, invalidated, isBound, removeListener, removeListener, set, toString, unbind
-
Methods inherited from interface javafx.beans.value.WritableValue
getValue
-
-
-
-
构造方法详细信息
-
ReadOnlyStringWrapper
public ReadOnlyStringWrapper()
构造函数为ReadOnlyStringWrapper
-
ReadOnlyStringWrapper
public ReadOnlyStringWrapper(String initialValue)
构造函数为ReadOnlyStringWrapper
- 参数
-
initialValue
- 包装值的初始值
-
ReadOnlyStringWrapper
public ReadOnlyStringWrapper(Object bean, String name)
构造函数为ReadOnlyStringWrapper
- 参数
-
bean
- 这个ReadOnlyStringProperty
的豆 -
name
- 这个名字ReadOnlyStringProperty
-
-
方法详细信息
-
getReadOnlyProperty
public ReadOnlyStringProperty getReadOnlyProperty()
返回readonly属性,该属性与此ReadOnlyStringWrapper
同步。- 结果
- 只读属性
-
fireValueChangedEvent
protected void fireValueChangedEvent()
发送所有附件的通知InvalidationListeners
和ChangeListeners
。 通过调用StringPropertyBase.set(java.lang.String)
手动调用该值,或者如果绑定变为无效,则调用该方法或绑定属性的情况下调用此方法。
-
-