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

javax.swing.LegacyGlueFocusTraversalPolicy should be made public and not final

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P5
    • None
    • 1.4.2
    • client-libs
    • Fix Understood
    • x86
    • windows_xp

    Description



      Name: jl125535 Date: 07/28/2004


      A DESCRIPTION OF THE REQUEST :
      The class javax.swing.LegacyGlueFocusTraversalPolicy is currently package-private and final, which makes it totally unusable in developer code. I think it should be made public.

      I reported this bug against JDK 1.5.0_b3 Snapshot, but it applies to all 1.4.x and 1.5.0_bx versions as well.

      JUSTIFICATION :
      In several 1.3.x-based Swing-based applications, I used the JComponent setNextFocusableComponent method to configure specific focus traversal orders. When I moved to JDK 1.4.x several months ago, I saw that this method became deprecated.

      Looking into the source code to find an optimal way to "undeprecate" my code, I learnt about the LegacyGlueFocusTraversalPolicy class used to implement the old setNextFocusableComponent behaviour.

      Had this class been public and not final, I would have used or derived it to properly manage my focus traversal policies. Instead, I copied several parts of the class into a new class of mine.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      javax.swing.LegacyGlueFocusTraversalPolicy should be public and not final.

      If this cannot be done, I would like to understand why...

      CUSTOMER SUBMITTED WORKAROUND :
      I have to take the LegacyGlueFocusTraversalPolicy class out of JDK 1.4.x or 1.5.x and make it a class of mine.
      (Incident Review ID: 290191)
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jleesunw Jon Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Imported:
                Indexed: