public class JTextComponentTextProperty extends com.github.leanframeworks.propertiesframework.base.property.AbstractReadableWritableProperty<String>
JTextComponent (for instance, a textfield,
a text area, etc.).
This property will always be synchronized with the contents of the document. Also, it is possible to modify the
component text by calling its JTextComponent.setText(String) method, or by modifying the contents of its
Document, or by call the setValue(String) method. In all cases, this property will notify its
listeners of any change.
However, please note that calling JTextComponent.setText(String) is very likely to make this property fire
two value change events, because replacing is usually first done by removing the old text and inserting the new one.
| Constructor and Description |
|---|
JTextComponentTextProperty(JTextComponent textComponent)
Constructor specifying the text component to which the property applies.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
String |
getValue() |
void |
setValue(String value) |
addChangeListener, getChangeListeners, isInhibited, isNotifyingListeners, maybeNotifyListeners, removeChangeListener, setInhibitedpublic JTextComponentTextProperty(JTextComponent textComponent)
textComponent - Text component to which the property applies.public void dispose()
dispose in interface com.github.leanframeworks.propertiesframework.api.common.Disposabledispose in class com.github.leanframeworks.propertiesframework.base.property.AbstractReadableProperty<String>Disposable.dispose()public String getValue()
ReadableProperty.getValue()public void setValue(String value)
WritableProperty.setValue(Object)Copyright © 2017. All rights reserved.