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.Locale
parseLocaleString(java.lang.String localeString)
void
setAsText(java.lang.String text)
Set the property value by parsing a given String.private static java.lang.String
trimLeadingWhitespace(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:PropertyEditor
Set 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:
setAsText
in interfacejava.beans.PropertyEditor
- Specified by:
setAsText
in interfacePropertyEditor<java.util.Locale>
- Specified by:
setAsText
in 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:
-
-