Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8263768

JFormattedTextField.AbstractFormatter.getDocumentFilter()/getNavigationFilter() spec doesn't mention what the default impls return and what does it mean

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 15, 16, 17
    • 17
    • client-libs

    Description

      The current state of specification for
      https://download.java.net/java/early_access/jdk17/docs/api/java.desktop/javax/swing/JFormattedTextField.AbstractFormatter.html#getDocumentFilter()
      https://download.java.net/java/early_access/jdk17/docs/api/java.desktop/javax/swing/JFormattedTextField.AbstractFormatter.html#getNavigationFilter()
      is the following
      ===============
      protected DocumentFilter getDocumentFilter()
      Subclass and override if you wish to provide a DocumentFilter to restrict what can be input. install will install the returned value onto the JFormattedTextField.
      Returns:
          DocumentFilter to restrict edits

      protected NavigationFilter getNavigationFilter()
      Subclass and override if you wish to provide a filter to restrict where the user can navigate to. install will install the returned value onto the JFormattedTextField.

      Returns:
          NavigationFilter to restrict navigation
      ===============

      Actually as per OpenJDK - null is returned by both "default" implementations and it means "no filtering", as other places in the code indicate

      Attachments

        Issue Links

          Activity

            People

              psadhukhan Prasanta Sadhukhan
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: