|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.beans.PropertyEditorSupport
org.springmodules.commons.lang.CommonsEnumPropertyEditor
public class CommonsEnumPropertyEditor
Converts to and from a commons-lang Enum.
| Constructor Summary | |
|---|---|
CommonsEnumPropertyEditor(java.lang.Class enumClass,
boolean allowEmpty)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAsText()
Returns the enum's name, or blank string if no enum has been set. |
void |
setAsText(java.lang.String text)
Turns a string to an enum. |
| Methods inherited from class java.beans.PropertyEditorSupport |
|---|
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommonsEnumPropertyEditor(java.lang.Class enumClass,
boolean allowEmpty)
enumClass - class of the enumallowEmpty - should a null value be OK?| Method Detail |
|---|
public java.lang.String getAsText()
getAsText in interface java.beans.PropertyEditorgetAsText in class java.beans.PropertyEditorSupportPropertyEditor.getAsText()
public void setAsText(java.lang.String text)
throws java.lang.IllegalArgumentException
setAsText in interface java.beans.PropertyEditorsetAsText in class java.beans.PropertyEditorSupporttext - the enum name
java.lang.IllegalArgumentExceptionPropertyEditor.setAsText(java.lang.String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||