|
JBoss Common Beans 1.1.0.Final-redhat-1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.beans.PropertyEditorSupport
org.jboss.common.beans.property.PropertyEditorSupport<T>
public abstract class PropertyEditorSupport<T>
| Constructor Summary | |
|---|---|
PropertyEditorSupport(Class<T> type)
Creates PropertyEditorSupport instance. |
|
PropertyEditorSupport(Class<T> type,
Object source)
Creates PropertyEditorSupport instance. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.beans.PropertyEditorSupport |
|---|
firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, setSource, supportsCustomEditor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyEditorSupport(Class<T> type)
public PropertyEditorSupport(Class<T> type,
Object source)
| Method Detail |
|---|
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()
PropertyEditor
getAsText 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()
PropertyEditor
getValue in interface PropertyEditorgetValue in class PropertyEditorSupportpublic void removePropertyChangeListener(PropertyChangeListener<T> listener)
PropertyEditor
listener - the PropertyChangeListener to removepublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface PropertyEditorremovePropertyChangeListener in class PropertyEditorSupportpublic void setValue(Object value)
PropertyEditor
setValue 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 void firePropertyChange(T oldValue,
T newValue)
protected Class<T> getType()
public abstract void setAsText(String text)
throws IllegalArgumentException
PropertyEditor
setAsText in interface PropertyEditorsetAsText in class PropertyEditorSupporttext - The string to be parsed.
IllegalArgumentException
|
JBoss Common Beans 1.1.0.Final-redhat-1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||