Class StrictNumberFormatter

All Implemented Interfaces:
Serializable, Cloneable

@Deprecated class StrictNumberFormatter extends NumberFormatter
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 Details

    • maxAsBig

      private BigDecimal maxAsBig
      Deprecated.
    • minAsBig

      private BigDecimal minAsBig
      Deprecated.
  • Constructor Details

    • StrictNumberFormatter

      public StrictNumberFormatter(NumberFormat format)
      Deprecated.
      Parameters:
      format -
  • Method Details

    • setValueClass

      public 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.

      Overrides:
      setValueClass in class DefaultFormatter
    • updateMinMax

      private void updateMinMax()
      Deprecated.
    • setMaximum

      public void setMaximum(Comparable max)
      Deprecated.
      Overrides:
      setMaximum in class InternationalFormatter
    • setMinimum

      public void setMinimum(Comparable minimum)
      Deprecated.
      Overrides:
      setMinimum in class InternationalFormatter
    • stringToValue

      public Object stringToValue(String text) throws ParseException
      Deprecated.
      Returns the Object representation of the String text, may be null.
      Overrides:
      stringToValue in class InternationalFormatter
      Parameters:
      text - String to convert
      Returns:
      Object representation of text
      Throws:
      ParseException - if there is an error in the conversion
    • convertValueToValueClass

      private Object convertValueToValueClass(Object value, Class<?> valueClass)
      Deprecated.
      Converts the passed in value to the passed in class. This only works if valueClass is one of Integer, Long, Float, Double, Byte or Short and value is an instanceof Number.
    • getParsedValue

      private Object getParsedValue(String text, Format f) throws ParseException
      Deprecated.
      Invokes parseObject on f, returning its value.
      Throws:
      ParseException
    • isValueInRange

      private boolean isValueInRange(Object orgValue, boolean wantsCCE)
      Deprecated.
      Returns true if value 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

      private Comparable<BigDecimal> getMinimumAsBig()
      Deprecated.
    • getMaximumAsBig

      private Comparable<BigDecimal> getMaximumAsBig()
      Deprecated.