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

The "com.sun.awt.AWTUtilities" class can be dropped in favour of public API

XMLWordPrintable

    • b31
    • generic
    • generic

      The client code has a "com.sun.awt.AWTUtilities" class which at some point(jdk6u10) in the past was used as a kind of "public" API.

      In jdk9 this class is inaccessible and all its functionality was already provided by the public API, so this class can be removed.

      AWTUtilities.isTranslucencySupported()/AWTUtilities.isWindowShapingSupported()
          -> GraphicsDevice.isWindowTranslucencySupported()

      AWTUtilities.setWindowOpacity()/AWTUtilities.getWindowOpacity()
          -> Window.setOpacity/getOpacity

      AWTUtilities.getWindowShape()/AWTUtilities.setWindowShape()
          -> Window.setShape()/getShape()

      AWTUtilities.setWindowOpaque/AWTUtilities.isWindowOpaque
          -> setBackground()/isOpaque()

      AWTUtilities.isTranslucencyCapable
          -> GraphicsConfiguration.isTranslucencyCapable()

      AWTUtilities.setComponentMixingCutoutShape
          -> Component.setMixingCutoutShape()

      CSR will be created after technical review.

            serb Sergey Bylokhov
            serb Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: