--- old/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java 2017-10-19 17:53:55.000000000 -0700 +++ new/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java 2017-10-19 17:53:55.000000000 -0700 @@ -25,7 +25,15 @@ package com.sun.awt; -import java.awt.*; +import java.awt.Component; +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; +import java.awt.Shape; +import java.awt.Toolkit; +import java.awt.Window; import javax.swing.JRootPane; @@ -64,6 +72,7 @@ * drastically between update release, and it may even be * removed or be moved in some other package(s)/class(es). */ +@Deprecated(forRemoval = true, since = "10") public final class AWTUtilities { /** @@ -114,7 +123,10 @@ * (either PERPIXEL_TRANSPARENT, * TRANSLUCENT, or PERPIXEL_TRANSLUCENT) * @return whether the given translucency kind is supported + * @deprecated use {@link GraphicsDevice#isWindowTranslucencySupported} + * instead */ + @Deprecated(forRemoval = true, since = "10") public static boolean isTranslucencySupported(Translucency translucencyKind) { switch (translucencyKind) { case PERPIXEL_TRANSPARENT: @@ -166,7 +178,9 @@ * and the opacity is less than 1.0f * @throws UnsupportedOperationException if the TRANSLUCENT translucency * kind is not supported + * @deprecated use {@link Window#setOpacity} instead */ + @Deprecated(forRemoval = true, since = "10") public static void setWindowOpacity(Window window, float opacity) { if (window == null) { throw new NullPointerException( @@ -182,7 +196,9 @@ * * @param window the window to get the opacity level from * @throws NullPointerException if the window argument is null + * @deprecated use {@link Window#getOpacity} instead */ + @Deprecated(forRemoval = true, since = "10") public static float getWindowOpacity(Window window) { if (window == null) { throw new NullPointerException( @@ -198,7 +214,10 @@ * Note that this method may sometimes return true, but the native * windowing system may still not support the concept of * shaping (due to the bugs in the windowing system). + * @deprecated use {@link GraphicsDevice#isWindowTranslucencySupported} + * instead */ + @Deprecated(forRemoval = true, since = "10") public static boolean isWindowShapingSupported() { Toolkit curToolkit = Toolkit.getDefaultToolkit(); if (!(curToolkit instanceof SunToolkit)) { @@ -216,7 +235,9 @@ * @param window the window to get the shape from * @return the current shape of the window * @throws NullPointerException if the window argument is null + * @deprecated use {@link Window#getShape} instead */ + @Deprecated(forRemoval = true, since = "10") public static Shape getWindowShape(Window window) { if (window == null) { throw new NullPointerException( @@ -247,7 +268,9 @@ * and the shape is not null * @throws UnsupportedOperationException if the PERPIXEL_TRANSPARENT * translucency kind is not supported + * @deprecated use {@link Window#setShape} instead */ + @Deprecated(forRemoval = true, since = "10") public static void setWindowShape(Window window, Shape shape) { if (window == null) { throw new NullPointerException( @@ -349,7 +372,9 @@ * isOpaque argument is {@code false}. * @throws UnsupportedOperationException if the PERPIXEL_TRANSLUCENT * translucency kind is not supported + * @deprecated use {@link Window#setBackground} instead */ + @Deprecated(forRemoval = true, since = "10") public static void setWindowOpaque(Window window, boolean isOpaque) { if (window == null) { throw new NullPointerException( @@ -369,7 +394,9 @@ * @return whether the window is currently opaque (true) * or translucent (false) * @throws NullPointerException if the window argument is null + * @deprecated use {@link Window#isOpaque} instead */ + @Deprecated(forRemoval = true, since = "10") public static boolean isWindowOpaque(Window window) { if (window == null) { throw new NullPointerException( @@ -395,7 +422,10 @@ * @throws NullPointerException if the gc argument is null * @return whether the given GraphicsConfiguration supports * the translucency effects. + * @deprecated use {@link GraphicsConfiguration#isTranslucencyCapable} + * instead */ + @Deprecated(forRemoval = true, since = "10") public static boolean isTranslucencyCapable(GraphicsConfiguration gc) { if (gc == null) { throw new NullPointerException("The gc argument should not be null"); @@ -448,8 +478,9 @@ * 'mixing-cutout' shape * @param shape the new 'mixing-cutout' shape * @throws NullPointerException if the component argument is {@code null} + * @deprecated use {@link Component#setMixingCutoutShape} instead */ - @Deprecated(since = "9") + @Deprecated(forRemoval = true, since = "9") public static void setComponentMixingCutoutShape(Component component, Shape shape) {