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

Refactor javafx.swing implementation to get rid of unneeded abstraction layer

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: openjfx12
    • Fix Version/s: openjfx12
    • Component/s: javafx
    • Labels:

      Description

      As part of decoupling JavaFX from the JDK we needed to change the implementation of FX / Swing interop to use public API provided in JDK 11 in the jdk.unsupported.desktop module.

      As a transitional step, we allow building and running openjfx 11 with either JDK 10 or JDK 11. To achieve this, we created an abstraction layer with a few abstract classes, and an InteropFactory that provides one of two concrete implementations: an "old" JDK-10-based implementation and a "new", JDK-11-based implementation.

      The old implementation is removed in openjfx12 by JDK-8210092, leaving only the new, JDK-11-based implementation. We could clean up the code by removing the abstraction layer and the factory class, and creating and using the new implementation classes directly.

      The following classes make up the abstraction layer:
          SwingNodeInterop
          JFXPanelInterop
          FXDnDInterop
          SwingFXUtilsImplInterop

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psadhukhan Prasanta Sadhukhan
                Reporter:
                kcr Kevin Rushforth
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: