Class BoundedRangeDecimalFormatterFactory

  • All Implemented Interfaces:
    java.io.Serializable

    public class BoundedRangeDecimalFormatterFactory
    extends javax.swing.text.DefaultFormatterFactory
    Bounded range factory for formatters with a min and max allowed value.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.swing.JFormattedTextField.AbstractFormatter getFormatter​(javax.swing.JFormattedTextField tf)  
      • Methods inherited from class javax.swing.text.DefaultFormatterFactory

        getDefaultFormatter, getDisplayFormatter, getEditFormatter, getNullFormatter, setDefaultFormatter, setDisplayFormatter, setEditFormatter, setNullFormatter
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BoundedRangeDecimalFormatterFactory

        public BoundedRangeDecimalFormatterFactory​(java.lang.String numberFormat)
        Constructor
        Parameters:
        numberFormat - a format string compatible with DecimalFormat
      • BoundedRangeDecimalFormatterFactory

        public BoundedRangeDecimalFormatterFactory​(java.lang.Double upperRangeValue,
                                                   java.lang.Double lowerRangeValue,
                                                   java.lang.String numberFormat)
        Constructor
        Parameters:
        upperRangeValue - the max value allowed
        lowerRangeValue - the min value allowed
        numberFormat - a format string compatible with DecimalFormat
    • Method Detail

      • getFormatter

        public javax.swing.JFormattedTextField.AbstractFormatter getFormatter​(javax.swing.JFormattedTextField tf)
        Overrides:
        getFormatter in class javax.swing.text.DefaultFormatterFactory