public abstract class AbstractConverter extends PropertyEditorSupport implements Converter
Modifier | Constructor and Description |
---|---|
protected |
AbstractConverter(Class type)
Creates an abstract converter for the specified type.
|
protected |
AbstractConverter(Class type,
boolean trim) |
Modifier and Type | Method and Description |
---|---|
String |
getAsText() |
Class |
getType()
Gets the the type of object supported by this converter.
|
Object |
getValue() |
void |
setAsText(String text) |
void |
setValue(Object value) |
Object |
toObject(String text)
Converts the supplied text in to an instance of the editor type.
|
protected abstract Object |
toObjectImpl(String text)
Converts the supplied text in to an instance of the editor type.
|
String |
toString(Object value)
Converts the supplied object to text.
|
protected String |
toStringImpl(Object value)
Converts the supplied object to text.
|
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor
protected AbstractConverter(Class type)
type
- type of the property editorprotected AbstractConverter(Class type, boolean trim)
public final Class getType()
Converter
public final String getAsText()
getAsText
in interface PropertyEditor
getAsText
in class PropertyEditorSupport
public final void setAsText(String text)
setAsText
in interface PropertyEditor
setAsText
in class PropertyEditorSupport
public final Object getValue()
getValue
in interface PropertyEditor
getValue
in class PropertyEditorSupport
public final void setValue(Object value)
setValue
in interface PropertyEditor
setValue
in class PropertyEditorSupport
public final String toString(Object value)
Converter
public final Object toObject(String text)
Converter
protected String toStringImpl(Object value)
value
- an instance of the editor typeCopyright © 2005-2014. All Rights Reserved.