swingutils.format

Contains convenience functions for working with formatters.

swingutils.format.installFormat(field, format)

Installs a Format in a JFormattedTextField.

Parameters:
swingutils.format.installNumberFormat(field, type=None, nullable=False, **kwargs)

Installs a number formatter in a JFormattedTextField.

Parameters:
  • field (JFormattedTextField) – the field to install the format to
  • type – a subclass of Number or a python numeric type
  • kwargs – attribute values to set on the PyDecimalFormat