public class StrictNumberFormatter extends NumberFormatter
Constructor and Description |
---|
StrictNumberFormatter(NumberFormat format) |
Modifier and Type | Method and Description |
---|---|
void |
setMaximum(Comparable max) |
void |
setMinimum(Comparable minimum) |
void |
setValueClass(Class<?> valueClass) |
Object |
stringToValue(String text)
Returns the
Object representation of the
String text , may be null. |
setFormat
clone, getActions, getFields, getFormat, getMaximum, getMinimum, install, valueToString
getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode
getFormattedTextField, invalidEdit, setEditValid, uninstall
public StrictNumberFormatter(NumberFormat format)
format
- public void setValueClass(Class<?> valueClass)
Overridden to automatically set the minimum/maximum to the boundaries of the Number type if it corresponds to a raw type, or null if not.
setValueClass
in class DefaultFormatter
public void setMaximum(Comparable max)
setMaximum
in class InternationalFormatter
public void setMinimum(Comparable minimum)
setMinimum
in class InternationalFormatter
public Object stringToValue(String text) throws ParseException
Object
representation of the
String
text
, may be null.stringToValue
in class InternationalFormatter
text
- String
to convertObject
representation of textParseException
- if there is an error in the conversionCopyright © 2018. All rights reserved.