public abstract class AbstractConverter extends java.beans.PropertyEditorSupport implements Converter
| Modifier and Type | Field and Description |
|---|---|
private boolean |
trim |
private java.lang.Class |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConverter(java.lang.Class type)
Creates an abstract converter for the specified type.
|
protected |
AbstractConverter(java.lang.Class type,
boolean trim) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAsText() |
java.lang.Class |
getType()
Gets the the type of object supported by this converter.
|
java.lang.Object |
getValue() |
void |
setAsText(java.lang.String text) |
void |
setValue(java.lang.Object value) |
java.lang.Object |
toObject(java.lang.String text)
Converts the supplied text in to an instance of the editor type.
|
protected abstract java.lang.Object |
toObjectImpl(java.lang.String text)
Converts the supplied text in to an instance of the editor type.
|
java.lang.String |
toString(java.lang.Object value)
Converts the supplied object to text.
|
protected java.lang.String |
toStringImpl(java.lang.Object value)
Converts the supplied object to text.
|
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditorprotected AbstractConverter(java.lang.Class type)
type - type of the property editorprotected AbstractConverter(java.lang.Class type,
boolean trim)
public final java.lang.Class getType()
Converterpublic final java.lang.String getAsText()
getAsText in interface java.beans.PropertyEditorgetAsText in class java.beans.PropertyEditorSupportpublic final void setAsText(java.lang.String text)
setAsText in interface java.beans.PropertyEditorsetAsText in class java.beans.PropertyEditorSupportpublic final java.lang.Object getValue()
getValue in interface java.beans.PropertyEditorgetValue in class java.beans.PropertyEditorSupportpublic final void setValue(java.lang.Object value)
setValue in interface java.beans.PropertyEditorsetValue in class java.beans.PropertyEditorSupportpublic final java.lang.String toString(java.lang.Object value)
Converterpublic final java.lang.Object toObject(java.lang.String text)
Converterprotected java.lang.String toStringImpl(java.lang.Object value)
value - an instance of the editor typeprotected abstract java.lang.Object toObjectImpl(java.lang.String text)
text - the text to convert