Class AbstractPropertyEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.apache.mina.integration.beans.AbstractPropertyEditor
-
- All Implemented Interfaces:
PropertyEditor
- Direct Known Subclasses:
ArrayEditor
,BooleanEditor
,CharacterEditor
,ClassEditor
,CollectionEditor
,DateEditor
,EnumEditor
,FileEditor
,InetAddressEditor
,InetSocketAddressEditor
,MapEditor
,NullEditor
,NumberEditor
,PatternEditor
,StringEditor
,URIEditor
,URLEditor
,VmPipeAddressEditor
public abstract class AbstractPropertyEditor extends PropertyEditorSupport
An abstract bi-directionalPropertyEditor
.- Author:
- Apache MINA Project
-
-
Constructor Summary
Constructors Constructor Description AbstractPropertyEditor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
defaultText()
protected Object
defaultValue()
String
getAsText()
Object
getValue()
void
setAsText(String text)
protected void
setTrimText(boolean trimText)
void
setValue(Object value)
protected abstract String
toText(Object value)
Returns a String representation of the given valueprotected abstract Object
toValue(String text)
Returns an instance from a String representation of an object-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
-
-
-
-
Method Detail
-
setTrimText
protected void setTrimText(boolean trimText)
-
getAsText
public String getAsText()
- Specified by:
getAsText
in interfacePropertyEditor
- Overrides:
getAsText
in classPropertyEditorSupport
-
getValue
public Object getValue()
- Specified by:
getValue
in interfacePropertyEditor
- Overrides:
getValue
in classPropertyEditorSupport
-
setAsText
public void setAsText(String text)
- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
-
setValue
public void setValue(Object value)
- Specified by:
setValue
in interfacePropertyEditor
- Overrides:
setValue
in classPropertyEditorSupport
-
defaultText
protected String defaultText()
- Returns:
- The default text
-
defaultValue
protected Object defaultValue()
- Returns:
- The default value
-
toText
protected abstract String toText(Object value)
Returns a String representation of the given value- Parameters:
value
- The value- Returns:
- A String representation of the value
-
-