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 ObjectconvertValueToValueClass(Object value, Class<?> valueClass) Deprecated.Converts the passed in value to the passed in class.private Comparable<BigDecimal> Deprecated.private Comparable<BigDecimal> Deprecated.private ObjectgetParsedValue(String text, Format f) Deprecated.InvokesparseObjectonf, returning its value.private booleanisValueInRange(Object orgValue, boolean wantsCCE) Deprecated.Returns true ifvalueis between the min/max.voidsetMaximum(Comparable max) Deprecated.voidsetMinimum(Comparable minimum) Deprecated.voidsetValueClass(Class<?> valueClass) Deprecated.stringToValue(String text) Deprecated.Returns theObjectrepresentation of theStringtext, may be null.private voidDeprecated.Methods inherited from class NumberFormatter
setFormatMethods inherited from class InternationalFormatter
clone, getActions, getFields, getFormat, getMaximum, getMinimum, install, valueToStringMethods inherited from class DefaultFormatter
getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteModeMethods inherited from class JFormattedTextField.AbstractFormatter
getFormattedTextField, invalidEdit, setEditValid, uninstall
-
Field Details
-
maxAsBig
Deprecated. -
minAsBig
Deprecated.
-
-
Constructor Details
-
StrictNumberFormatter
-
-
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:
setValueClassin classDefaultFormatter
-
updateMinMax
private void updateMinMax()Deprecated. -
setMaximum
Deprecated.- Overrides:
setMaximumin classInternationalFormatter
-
setMinimum
Deprecated.- Overrides:
setMinimumin classInternationalFormatter
-
stringToValue
Deprecated.Returns theObjectrepresentation of theStringtext, may be null.- Overrides:
stringToValuein classInternationalFormatter- Parameters:
text-Stringto convert- Returns:
Objectrepresentation of text- Throws:
ParseException- if there is an error in the conversion
-
convertValueToValueClass
-
getParsedValue
-
isValueInRange
Deprecated.Returns true ifvalueis 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.
-