Replace com.sun.awt.AWTUtilities static method invocations

MSAL

This recipe replaces several static calls in com.sun.awt.AWTUtilities with the JavaSE 11 equivalent. The methods replaced are AWTUtilities.isTranslucencySupported(), AWTUtilities.setWindowOpacity(), AWTUtilities.getWindowOpacity(), AWTUtilities.getWindowShape(), AWTUtilities.isWindowOpaque(), AWTUtilities.isTranslucencyCapable() and AWTUtilities.setComponentMixingCutoutShape().

org.openrewrite.java.migrate.ReplaceComSunAWTUtilitiesMethods

Optional

A method pattern matching the AWTUtilities.isTranslucencySupported(Translucency) method to replace. Defaults to the method on com.sun.awt.AWTUtilities.

A method pattern matching the AWTUtilities.isWindowOpaque(Window) method to replace. Defaults to the method on com.sun.awt.AWTUtilities.

A method pattern matching the AWTUtilities.isTranslucencyCapable(GraphicsConfiguration) method to replace. Defaults to the method on com.sun.awt.AWTUtilities.

A method pattern matching the AWTUtilities.setWindowOpacity(Window, float) method to replace. Defaults to the method on com.sun.awt.AWTUtilities.

A method pattern matching the AWTUtilities.getWindowOpacity(Window) method to replace. Defaults to the method on com.sun.awt.AWTUtilities.

A method pattern matching the AWTUtilities.getWindowShape(Window) method to replace. Defaults to the method on com.sun.awt.AWTUtilities.

A method pattern matching the AWTUtilities.setComponentMixingCutoutShape(Component, Shape) method to replace. Defaults to the method on com.sun.awt.AWTUtilities.

mod run . --recipe=org.openrewrite.java.migrate.ReplaceComSunAWTUtilitiesMethods

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.