public interface PropertyEditor<T>
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener<T> listener)
Adds a listener for the value change.
|
String |
getAsText()
Gets the property value as text.
|
T |
getValue()
Gets the property value.
|
void |
removePropertyChangeListener(PropertyChangeListener<T> listener)
Removes a listener for the value change.
|
void |
setAsText(String text)
Set the property value by parsing a given String.
|
void |
setValue(Object value)
Set (or change) the object that is to be edited.
|
void setValue(Object value)
value
- The new target object to be edited. Note that this
object should not be modified by the PropertyEditor, rather
the PropertyEditor should create a new object to hold any
modified value.T getValue()
String getAsText()
Returns null if the value can't be expressed as an editable string.
If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().
void setAsText(String text) throws IllegalArgumentException
text
- The string to be parsed.IllegalArgumentException
void addPropertyChangeListener(PropertyChangeListener<T> listener)
PropertyChangeEvent
on all registered PropertyChangeListener
s,
specifying the null
value for the property name
and itself as the source.listener
- the PropertyChangeListener
to addvoid removePropertyChangeListener(PropertyChangeListener<T> listener)
listener
- the PropertyChangeListener
to removeCopyright © 2014 JBoss by Red Hat. All rights reserved.