@Deprecated class StrictNumberFormatter extends NumberFormatter
Modifier and Type | Field and Description |
---|---|
private BigDecimal |
maxAsBig
Deprecated.
|
private BigDecimal |
minAsBig
Deprecated.
|
Constructor and Description |
---|
StrictNumberFormatter(NumberFormat format)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private Object |
convertValueToValueClass(Object value,
Class<?> valueClass)
Deprecated.
Converts the passed in value to the passed in class.
|
private Comparable<BigDecimal> |
getMaximumAsBig()
Deprecated.
|
private Comparable<BigDecimal> |
getMinimumAsBig()
Deprecated.
|
private Object |
getParsedValue(String text,
Format f)
Deprecated.
Invokes
parseObject on f , returning
its value. |
private boolean |
isValueInRange(Object orgValue,
boolean wantsCCE)
Deprecated.
Returns true if
value is between the min/max. |
void |
setMaximum(Comparable max)
Deprecated.
|
void |
setMinimum(Comparable minimum)
Deprecated.
|
void |
setValueClass(Class<?> valueClass)
Deprecated.
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.
|
Object |
stringToValue(String text)
Deprecated.
Returns the
Object representation of the
String text , may be null. |
private void |
updateMinMax()
Deprecated.
|
setFormat
clone, getActions, getFields, getFormat, getMaximum, getMinimum, install, valueToString
getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode
getFormattedTextField, invalidEdit, setEditValid, uninstall
private BigDecimal maxAsBig
private BigDecimal minAsBig
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
private void updateMinMax()
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 conversionprivate Object convertValueToValueClass(Object value, Class<?> valueClass)
valueClass
is one of Integer
,
Long
, Float
, Double
,
Byte
or Short
and value
is an instanceof Number
.private Object getParsedValue(String text, Format f) throws ParseException
parseObject
on f
, returning
its value.ParseException
private boolean isValueInRange(Object orgValue, boolean wantsCCE)
value
is between the min/max.wantsCCE
- If false, and a ClassCastException is thrown in
comparing the values, the exception is consumed and
false is returned.private Comparable<BigDecimal> getMinimumAsBig()
private Comparable<BigDecimal> getMaximumAsBig()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses