< prev index next >

src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java

Print this page

        

*** 23,33 **** * questions. */ package com.sun.awt; ! import java.awt.*; import javax.swing.JRootPane; import sun.awt.AWTAccessor; import sun.awt.SunToolkit; --- 23,41 ---- * questions. */ package com.sun.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; import sun.awt.AWTAccessor; import sun.awt.SunToolkit;
*** 62,71 **** --- 70,80 ---- * <b>WARNING</b>: This class is an implementation detail and only meant * for limited use outside of the core platform. This API may change * 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 { /** * The AWTUtilities class should not be instantiated */
*** 112,122 **** --- 121,134 ---- * * @param translucencyKind a kind of translucency support * (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: return isWindowShapingSupported(); case TRANSLUCENT:
*** 164,174 **** --- 176,188 ---- * the range [0..1] * @throws IllegalArgumentException if the window is in full screen mode, * 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( "The window argument should not be null."); }
*** 180,190 **** --- 194,206 ---- * Get the opacity of the window. If the opacity has not * yet being set, this method returns 1.0. * * @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( "The window argument should not be null."); }
*** 196,206 **** --- 212,225 ---- * Returns whether the windowing system supports changing the shape * of top-level windows. * 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)) { return false; }
*** 214,224 **** --- 233,245 ---- * this method returns null. * * @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( "The window argument should not be null."); }
*** 245,255 **** --- 266,278 ---- * @throws NullPointerException if the window argument is null * @throws IllegalArgumentException if the window is in full screen mode, * 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( "The window argument should not be null."); }
*** 347,357 **** --- 370,382 ---- * and the isOpaque is false * @throws IllegalArgumentException if the window is decorated and the * 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( "The window argument should not be null."); }
*** 367,377 **** --- 392,404 ---- * * @param window the window to set the shape to * @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( "The window argument should not be null."); }
*** 393,403 **** --- 420,433 ---- * * @param gc GraphicsConfiguration * @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"); } /*
*** 446,457 **** * * @param component the component that needs non-default * 'mixing-cutout' shape * @param shape the new 'mixing-cutout' shape * @throws NullPointerException if the component argument is {@code null} */ ! @Deprecated(since = "9") public static void setComponentMixingCutoutShape(Component component, Shape shape) { if (component == null) { throw new NullPointerException( --- 476,488 ---- * * @param component the component that needs non-default * '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(forRemoval = true, since = "9") public static void setComponentMixingCutoutShape(Component component, Shape shape) { if (component == null) { throw new NullPointerException(
< prev index next >