Package org.jdesktop.swingx.table
Class StrictNumberFormatter
java.lang.Object
javax.swing.JFormattedTextField.AbstractFormatter
javax.swing.text.DefaultFormatter
javax.swing.text.InternationalFormatter
javax.swing.text.NumberFormatter
org.jdesktop.swingx.table.StrictNumberFormatter
- All Implemented Interfaces:
Serializable
,Cloneable
Deprecated.
(pre-1.6.2) moved to text package
Experiment to work around Issue #1183-swingx: NumberEditorExt throws exception
on getCellValue. Remaining issue: no visual error feedback if the expected
number type exceeds its range.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Object
convertValueToValueClass
(Object value, Class<?> valueClass) Deprecated.Converts the passed in value to the passed in class.private Comparable
<BigDecimal> Deprecated.private Comparable
<BigDecimal> Deprecated.private Object
getParsedValue
(String text, Format f) Deprecated.InvokesparseObject
onf
, returning its value.private boolean
isValueInRange
(Object orgValue, boolean wantsCCE) Deprecated.Returns true ifvalue
is between the min/max.void
setMaximum
(Comparable max) Deprecated.void
setMinimum
(Comparable minimum) Deprecated.void
setValueClass
(Class<?> valueClass) Deprecated.stringToValue
(String text) Deprecated.Returns theObject
representation of theString
text
, may be null.private void
Deprecated.Methods inherited from class javax.swing.text.NumberFormatter
setFormat
Methods inherited from class javax.swing.text.InternationalFormatter
clone, getActions, getFields, getFormat, getMaximum, getMinimum, install, valueToString
Methods inherited from class javax.swing.text.DefaultFormatter
getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode
Methods inherited from class javax.swing.JFormattedTextField.AbstractFormatter
getFormattedTextField, invalidEdit, setEditValid, uninstall
-
Field Details
-
maxAsBig
Deprecated. -
minAsBig
Deprecated.
-
-
Constructor Details
-
StrictNumberFormatter
Deprecated.- Parameters:
format
-
-
-
Method Details
-
setValueClass
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.
- Overrides:
setValueClass
in classDefaultFormatter
-
updateMinMax
private void updateMinMax()Deprecated. -
setMaximum
Deprecated.- Overrides:
setMaximum
in classInternationalFormatter
-
setMinimum
Deprecated.- Overrides:
setMinimum
in classInternationalFormatter
-
stringToValue
Deprecated.Returns theObject
representation of theString
text
, may be null.- Overrides:
stringToValue
in classInternationalFormatter
- Parameters:
text
-String
to convert- Returns:
Object
representation of text- Throws:
ParseException
- if there is an error in the conversion
-
convertValueToValueClass
Deprecated.Converts the passed in value to the passed in class. This only works ifvalueClass
is one ofInteger
,Long
,Float
,Double
,Byte
orShort
andvalue
is an instanceofNumber
. -
getParsedValue
Deprecated.InvokesparseObject
onf
, returning its value.- Throws:
ParseException
-
isValueInRange
Deprecated.Returns true ifvalue
is between the min/max.- Parameters:
wantsCCE
- If false, and a ClassCastException is thrown in comparing the values, the exception is consumed and false is returned.
-
getMinimumAsBig
Deprecated. -
getMaximumAsBig
Deprecated.
-