com.basistech.util
Class LanguageCodeEditor
java.lang.Object
java.beans.PropertyEditorSupport
com.basistech.util.LanguageCodeEditor
- All Implemented Interfaces:
- PropertyEditor
public class LanguageCodeEditor
- extends PropertyEditorSupport
This class provides notational convenience for users of the Spring
IoC container, or any other facility that participates in the
java.beans property editor discipline. JavaBeans automatically
discovers PropertyEditor classes if they are in the same package as
the class they handle, and have the same name but with an 'Editor'
suffix.
This class turns a String value into a valid value for a property
of type LanguageCode
. The string is converted via the
function LanguageCode.lookupByISO639(java.lang.String)
.
Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor |
LanguageCodeEditor
public LanguageCodeEditor()
setAsText
public void setAsText(String text)
throws IllegalArgumentException
- Set the language code.
- Specified by:
setAsText
in interface PropertyEditor
- Overrides:
setAsText
in class PropertyEditorSupport
- Parameters:
text
- String representation of a language code.
- Throws:
IllegalArgumentException
getAsText
public String getAsText()
- Get the language code.
- Specified by:
getAsText
in interface PropertyEditor
- Overrides:
getAsText
in class PropertyEditorSupport
- Returns:
- String representation of the language code.
Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.