public abstract class PropertyEditorSupport<T> extends PropertyEditorSupport implements PropertyEditor<T>
| Constructor and Description |
|---|
PropertyEditorSupport(Class<T> type)
Creates PropertyEditorSupport instance.
|
PropertyEditorSupport(Class<T> type,
Object source)
Creates PropertyEditorSupport instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
void |
addPropertyChangeListener(PropertyChangeListener<T> listener)
Adds a listener for the value change.
|
void |
firePropertyChange(T oldValue,
T newValue) |
String |
getAsText()
Gets the property value as text.
|
protected Class<T> |
getType() |
T |
getValue()
Gets the property value.
|
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
removePropertyChangeListener(PropertyChangeListener<T> listener)
Removes a listener for the value change.
|
abstract 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.
|
firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, setSource, supportsCustomEditorpublic PropertyEditorSupport(Class<T> type)
public void addPropertyChangeListener(PropertyChangeListener<T> listener)
PropertyEditorPropertyChangeEvent
on all registered PropertyChangeListeners,
specifying the null value for the property name
and itself as the source.listener - the PropertyChangeListener to addpublic void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface PropertyEditoraddPropertyChangeListener in class PropertyEditorSupportpublic String getAsText()
PropertyEditorgetAsText in interface PropertyEditorgetAsText in class PropertyEditorSupportReturns 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().
public T getValue()
PropertyEditorgetValue in interface PropertyEditorgetValue in class PropertyEditorSupportpublic void removePropertyChangeListener(PropertyChangeListener<T> listener)
PropertyEditorlistener - the PropertyChangeListener to removepublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface PropertyEditorremovePropertyChangeListener in class PropertyEditorSupportpublic void setValue(Object value)
PropertyEditorsetValue in interface PropertyEditorsetValue in class PropertyEditorSupportvalue - 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.public abstract void setAsText(String text) throws IllegalArgumentException
PropertyEditorsetAsText in interface PropertyEditorsetAsText in class PropertyEditorSupporttext - The string to be parsed.IllegalArgumentExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.