Package org.jboss.common.beans.property
Class LocaleEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.jboss.common.beans.property.PropertyEditorSupport<java.util.Locale>
-
- org.jboss.common.beans.property.LocaleEditor
-
- All Implemented Interfaces:
java.beans.PropertyEditor,PropertyEditor<java.util.Locale>
public class LocaleEditor extends PropertyEditorSupport<java.util.Locale>
Locale editor.
-
-
Constructor Summary
Constructors Constructor Description LocaleEditor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.LocaleparseLocaleString(java.lang.String localeString)voidsetAsText(java.lang.String text)Set the property value by parsing a given String.private static java.lang.StringtrimLeadingWhitespace(java.lang.String substring)-
Methods inherited from class org.jboss.common.beans.property.PropertyEditorSupport
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getAsText, getType, getValue, removePropertyChangeListener, removePropertyChangeListener, setValue
-
-
-
-
Method Detail
-
setAsText
public void setAsText(java.lang.String text)
Description copied from interface:PropertyEditorSet the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text.- Specified by:
setAsTextin interfacejava.beans.PropertyEditor- Specified by:
setAsTextin interfacePropertyEditor<java.util.Locale>- Specified by:
setAsTextin classPropertyEditorSupport<java.util.Locale>- Parameters:
text- The string to be parsed.
-
parseLocaleString
private static java.util.Locale parseLocaleString(java.lang.String localeString)
-
trimLeadingWhitespace
private static java.lang.String trimLeadingWhitespace(java.lang.String substring)
- Parameters:
substring-- Returns:
-
-