org.apache.mina.integration.beans
Class AbstractPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by 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, SerialAddressEditor, StringEditor, TrafficMaskEditor, URIEditor, URLEditor, VmPipeAddressEditor

public abstract class AbstractPropertyEditor
extends PropertyEditorSupport

An abstract bi-directional PropertyEditor.

Version:
$Rev: 601229 $, $Date: 2007-12-05 08:13:18 +0100 (mer, 05 déc 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
AbstractPropertyEditor()
           
 
Method Summary
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)
           
protected abstract  Object toValue(String text)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPropertyEditor

public AbstractPropertyEditor()
Method Detail

setTrimText

protected void setTrimText(boolean trimText)

getAsText

public String getAsText()
Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport

getValue

public Object getValue()
Specified by:
getValue in interface PropertyEditor
Overrides:
getValue in class PropertyEditorSupport

setAsText

public void setAsText(String text)
               throws IllegalArgumentException
Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Throws:
IllegalArgumentException

setValue

public void setValue(Object value)
Specified by:
setValue in interface PropertyEditor
Overrides:
setValue in class PropertyEditorSupport

defaultText

protected String defaultText()

defaultValue

protected Object defaultValue()

toText

protected abstract String toText(Object value)

toValue

protected abstract Object toValue(String text)
                           throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.