<AWT Dev> Code review request to fix awt javadoc build warnings in JDK 7

Anthony Petrov Anthony.Petrov at Sun.COM
Fri Aug 28 00:12:21 PDT 2009


Hi Joe,

The patch looks great. Thanks for fixing that. Approved.

--
best regards,
Anthony

On 8/28/2009 12:46 AM Joseph D. Darcy wrote:
> Greetings.
> 
> While doing some other documentation work, I noticed there were dozens 
> of javadoc build warnings coming out of java.awt.*.  I'm submitting the 
> patch below for your review; the patch corrects all those warnings from 
> awt,.  If approved, I will file a bug and commit the changes back 
> through TL.  Most of the warnings stemmed from new API added to 
> java.awt.Window in JDK 7.  When doing such API changes, as a good 
> practice I like to run a docs build first to see if any warnings are 
> introduced.
> 
> Cheers,
> 
> -Joe
> 
> --- old/src/share/classes/java/awt/Cursor.java    2009-08-27 
> 13:43:40.000000000 -0700
> +++ new/src/share/classes/java/awt/Cursor.java    2009-08-27 
> 13:43:39.000000000 -0700
> @@ -119,7 +119,7 @@
>     public static final int     MOVE_CURSOR                     = 13;
> 
>     /**
> -      * @deprecated As of JDK version 1.7, the {@link 
> #getPredefinedCursor()}
> +      * @deprecated As of JDK version 1.7, the {@link 
> #getPredefinedCursor(int)}
>       * method should be used instead.
>       */
>     @Deprecated
> --- old/src/share/classes/java/awt/Window.java    2009-08-27 
> 13:43:41.000000000 -0700
> +++ new/src/share/classes/java/awt/Window.java    2009-08-27 
> 13:43:40.000000000 -0700
> @@ -3347,7 +3347,7 @@
>      *
>      * @return the opacity of the window
>      *
> -     * @see Window#setOpacity
> +     * @see Window#setOpacity(float)
>      * @see GraphicsDevice.WindowTranslucency
>      *
>      * @since 1.7
> @@ -3366,7 +3366,7 @@
>      * window. This is a platform-dependent behavior.
>      * <p>
>      * In order for this method to enable the translucency effect, the 
> {@link
> -     * GraphicsDevice#isWindowTranslucencySupported()} method must 
> indicate that
> +     * 
> GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)} 
> method must indicate that
>      * the {@link GraphicsDevice.WindowTranslucency#TRANSLUCENT 
> TRANSLUCENT}
>      * translucency is supported.
>      * <p>
> @@ -3375,8 +3375,8 @@
>      * IllegalComponentStateException} is thrown.
>      * <p>
>      * The translucency levels of individual pixels may also be effected 
> by the
> -     * alpha component of their color (see {@link setBackground()}) and 
> the
> -     * current shape of this window (see {@link setShape()}).
> +     * alpha component of their color (see {@link 
> Window#setBackground(Color)}) and the
> +     * current shape of this window (see {@link #setShape(Shape)}).
>      *
>      * @param opacity the opacity level to set to the window
>      *
> @@ -3389,10 +3389,10 @@
>      *     translucency kind is not supported and the opacity is less 
> than 1.0f
>      *
>      * @see Window#getOpacity
> -     * @see Window#setBackground()
> -     * @see Window#setShape()
> +     * @see Window#setBackground(Color)
> +     * @see Window#setShape(Shape)
>      * @see GraphicsDevice.WindowTranslucency
> -     * @see GraphicsDevice#isWindowTranslucencySupported()
> +     * @see 
> GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency) 
> 
>      *
>      * @since 1.7
>      */
> @@ -3434,7 +3434,7 @@
>      * @return the shape of the window or {@code null} if no
>      *     shape is specified for the window
>      *
> -     * @see Window#setShape
> +     * @see Window#setShape(Shape)
>      * @see GraphicsDevice.WindowTranslucency
>      *
>      * @since 1.7
> @@ -3458,19 +3458,19 @@
>      * <ul>
>      * <li>The {@link 
> GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSPARENT
>      * PERPIXEL_TRANSPARENT} translucency kind must be supported by the
> -     * underlying system (see {@link })
> +     * underlying system
>      * <i>and</i>
>      * <li>The window must not be in the full-screen mode (see
> -     * {@link GraphicsDevice#setFullScreenWindow()})
> +     * {@link GraphicsDevice#setFullScreenWindow(Window)})
>      * </ul>
>      * If a certain condition is not met, either the {@code
>      * UnsupportedOperationException} or {@code 
> IllegalComponentStateException}
>      * is thrown.
>      * <p>
>      * The tranlucency levels of individual pixels may also be effected 
> by the
> -     * alpha component of their color (see {@link setBackground()}) and 
> the
> -     * opacity value (see {@link setOpacity()}). See {@link
> -     * GraphicsDevice#WindowTranslucency} for more details.
> +     * alpha component of their color (see {@link 
> Window#setBackground(Color)}) and the
> +     * opacity value (see {@link #setOpacity(float)}). See {@link
> +     * GraphicsDevice.WindowTranslucency} for more details.
>      *
>      * @param shape the shape to set to the window
>      *
> @@ -3481,10 +3481,10 @@
>      *     PERPIXEL_TRANSPARENT} translucency is not supported
>      *
>      * @see Window#getShape()
> -     * @see Window#setBackgound()
> -     * @see Window#setOpacity()
> +     * @see Window#setBackground(Color)
> +     * @see Window#setOpacity(float)
>      * @see GraphicsDevice.WindowTranslucency
> -     * @see GraphicsDevice#isWindowTranslucencySupported()
> +     * @see 
> GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency) 
> 
>      *
>      * @since 1.7
>      */
> @@ -3520,7 +3520,7 @@
>      *
>      * @return this component's background color
>      *
> -     * @see Window#setBackground
> +     * @see Window#setBackground(Color)
>      * @see Window#isOpaque
>      * @see GraphicsDevice.WindowTranslucency
>      */
> @@ -3544,7 +3544,7 @@
>      * PERPIXEL_TRANSLUCENT} translucency must be supported
>      * by the graphics device where this window is located <i>and</i>
>      * <li>The window must not be in the full-screen mode (see {@link
> -     * GraphicsDevice#setFullScreenWindow()})
> +     * GraphicsDevice#setFullScreenWindow(Window)})
>      * </ul>
>      * If a certain condition is not met at the time of calling this 
> method,
>      * the alpha component of the given background color will not effect 
> the
> @@ -3561,8 +3561,8 @@
>      * method is equal to zero.)
>      * <p>
>      * The actual level of translucency of a given pixel also depends on 
> window
> -     * opacity (see {@link setOpacity()}), as well as the current shape of
> -     * this window (see {@link setShape()}).
> +     * opacity (see {@link #setOpacity(float)}), as well as the current 
> shape of
> +     * this window (see {@link #setShape(Shape)}).
>      * <p>
>      * Note that painting a pixel with the alpha value of 0 may or may not
>      * disable the mouse event handling on this pixel. This is a
> @@ -3585,10 +3585,10 @@
>      *
>      * @see Window#getBackground
>      * @see Window#isOpaque
> -     * @see Window#setOpacity()
> -     * @see Window#setShape()
> +     * @see Window#setOpacity(float)
> +     * @see Window#setShape(Shape)
>      * @see GraphicsDevice.WindowTranslucency
> -     * @see GraphicsDevice#isWindowTranslucencySupported()
> +     * @see 
> GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency) 
> 
>      * @see GraphicsConfiguration#isTranslucencyCapable()
>      */
>     @Override
> @@ -3635,7 +3635,7 @@
>      * @return {@code true} if the window is opaque, {@code false} 
> otherwise
>      *
>      * @see Window#getBackground
> -     * @see Window#setBackground
> +     * @see Window#setBackground(Color)
>      * @since 1.7
>      */
>     @Override
> --- old/src/share/classes/java/awt/dnd/DragSourceContext.java    
> 2009-08-27 13:43:41.000000000 -0700
> +++ new/src/share/classes/java/awt/dnd/DragSourceContext.java    
> 2009-08-27 13:43:41.000000000 -0700
> @@ -275,7 +275,7 @@
>      *
>      * @param c     the initial {@code Cursor} for this drag operation,
>      *                       or {@code null} for the default cursor 
> handling;
> -     *                       see {@linkplain #defaultCursor class
> +     *                       see {@linkplain Cursor class
>      *                       level documentation} for more details
>      *                       on the cursor handling during drag and drop
>      *
> 



More information about the awt-dev mailing list