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 StringdefaultText()protected ObjectdefaultValue()StringgetAsText()ObjectgetValue()voidsetAsText(String text)protected voidsetTrimText(boolean trimText)voidsetValue(Object value)protected abstract StringtoText(Object value)Returns a String representation of the given valueprotected abstract ObjecttoValue(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:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport
-
getValue
public Object getValue()
- Specified by:
getValuein interfacePropertyEditor- Overrides:
getValuein classPropertyEditorSupport
-
setAsText
public void setAsText(String text)
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport
-
setValue
public void setValue(Object value)
- Specified by:
setValuein interfacePropertyEditor- Overrides:
setValuein 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
-
-