de.caff.gimmicks.swing

## Class PhysicalLengthTextField.PhysicalLengthFormatter

- java.lang.Object
- - javax.swing.JFormattedTextField.AbstractFormatter
  - - javax.swing.text.DefaultFormatter
    - - de.caff.gimmicks.swing.PhysicalLengthTextField.PhysicalLengthFormatter

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
  Enclosing class:
    PhysicalLengthTextField

      public static class PhysicalLengthTextField.PhysicalLengthFormatter
      extends javax.swing.text.DefaultFormatter

  Formatter implementation for physical lengths.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PhysicalLengthFormatter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PhysicalLengthTextField.PhysicalLengthFormatter` | `clone()` Clone.
    `java.lang.Object` | `stringToValue(java.lang.String text)` Parses `text` returning an arbitrary Object.
    `java.lang.String` | `valueToString(java.lang.Object value)` Returns the string value to display for `value`.

    - ### Methods inherited from class javax.swing.text.DefaultFormatter

      `getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, install, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode, setValueClass`

    - ### Methods inherited from class javax.swing.JFormattedTextField.AbstractFormatter

      `getActions, getFormattedTextField, invalidEdit, setEditValid, uninstall`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PhysicalLengthFormatter

          public PhysicalLengthFormatter()

  - ### Method Detail

    - #### stringToValue

          public java.lang.Object stringToValue(java.lang.String text)
                                         throws java.text.ParseException

      Parses `text` returning an arbitrary Object. Some formatters may return null.
      Overrides:
        `stringToValue` in class `javax.swing.text.DefaultFormatter`
      Parameters:
        `text` - String to convert
      Returns:
        Object representation of text
      Throws:
        `java.text.ParseException` - if there is an error in the conversion

    - #### valueToString

          public java.lang.String valueToString(java.lang.Object value)
                                         throws java.text.ParseException

      Returns the string value to display for `value`.
      Overrides:
        `valueToString` in class `javax.swing.text.DefaultFormatter`
      Parameters:
        `value` - Value to convert
      Returns:
        String representation of value
      Throws:
        `java.text.ParseException` - if there is an error in the conversion

    - #### clone

          public PhysicalLengthTextField.PhysicalLengthFormatter clone()
                                                                throws java.lang.CloneNotSupportedException

      Clone.
      Overrides:
        `clone` in class `javax.swing.text.DefaultFormatter`
      Returns:
        clone
      Throws:
        `java.lang.CloneNotSupportedException` - on cloning problems