8040893: Add block tags for @return and @param to swing border classes
authoryan
Mon, 19 May 2014 10:43:09 +0400
changeset 24500 399b77799d66
parent 24499 9c83666ebd5e
child 24501 767c30e88a61
8040893: Add block tags for @return and @param to swing border classes Reviewed-by: malenkov, alexsch Contributed-by: Steven Sides <steve.sides@oracle.com>
jdk/src/share/classes/javax/swing/border/BevelBorder.java
jdk/src/share/classes/javax/swing/border/Border.java
jdk/src/share/classes/javax/swing/border/CompoundBorder.java
jdk/src/share/classes/javax/swing/border/EmptyBorder.java
jdk/src/share/classes/javax/swing/border/EtchedBorder.java
jdk/src/share/classes/javax/swing/border/LineBorder.java
jdk/src/share/classes/javax/swing/border/MatteBorder.java
--- a/jdk/src/share/classes/javax/swing/border/BevelBorder.java	Mon May 19 10:34:42 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/border/BevelBorder.java	Mon May 19 10:43:09 2014 +0400
@@ -134,7 +134,9 @@
      * when rendered on the specified component.  If no highlight
      * color was specified at instantiation, the highlight color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the highlight may be derived
+     * @return the outer highlight {@code Color}
      * @since 1.3
      */
     public Color getHighlightOuterColor(Component c)   {
@@ -148,7 +150,9 @@
      * when rendered on the specified component.  If no highlight
      * color was specified at instantiation, the highlight color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the highlight may be derived
+     * @return the inner highlight {@code Color}
      * @since 1.3
      */
     public Color getHighlightInnerColor(Component c)   {
@@ -162,7 +166,9 @@
      * when rendered on the specified component.  If no shadow
      * color was specified at instantiation, the shadow color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the shadow may be derived
+     * @return the inner shadow {@code Color}
      * @since 1.3
      */
     public Color getShadowInnerColor(Component c)      {
@@ -176,7 +182,9 @@
      * when rendered on the specified component.  If no shadow
      * color was specified at instantiation, the shadow color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the shadow may be derived
+     * @return the outer shadow {@code Color}
      * @since 1.3
      */
     public Color getShadowOuterColor(Component c)      {
@@ -189,6 +197,9 @@
      * Returns the outer highlight color of the bevel border.
      * Will return null if no highlight color was specified
      * at instantiation.
+     *
+     * @return the outer highlight {@code Color} or {@code null} if no highlight
+     *         color was specified
      * @since 1.3
      */
     public Color getHighlightOuterColor()   {
@@ -199,6 +210,9 @@
      * Returns the inner highlight color of the bevel border.
      * Will return null if no highlight color was specified
      * at instantiation.
+     *
+     * @return the inner highlight {@code Color} or {@code null} if no highlight
+     *         color was specified
      * @since 1.3
      */
     public Color getHighlightInnerColor()   {
@@ -209,6 +223,9 @@
      * Returns the inner shadow color of the bevel border.
      * Will return null if no shadow color was specified
      * at instantiation.
+     *
+     * @return the inner shadow {@code Color} or {@code null} if no shadow color
+     *         was specified
      * @since 1.3
      */
     public Color getShadowInnerColor()      {
@@ -219,6 +236,9 @@
      * Returns the outer shadow color of the bevel border.
      * Will return null if no shadow color was specified
      * at instantiation.
+     *
+     * @return the outer shadow {@code Color} or {@code null} if no shadow color
+     *         was specified
      * @since 1.3
      */
     public Color getShadowOuterColor()      {
@@ -227,13 +247,18 @@
 
     /**
      * Returns the type of the bevel border.
+     *
+     * @return the bevel border type, either {@code RAISED} or {@code LOWERED}
      */
     public int getBevelType()       {
         return bevelType;
     }
 
     /**
-     * Returns whether or not the border is opaque.
+     * Returns whether or not the border is opaque. This implementation
+     * returns {@code true}.
+     *
+     * @return true
      */
     public boolean isBorderOpaque() { return true; }
 
--- a/jdk/src/share/classes/javax/swing/border/Border.java	Mon May 19 10:34:42 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/border/Border.java	Mon May 19 10:43:09 2014 +0400
@@ -66,6 +66,7 @@
     /**
      * Paints the border for the specified component with the specified
      * position and size.
+     *
      * @param c the component for which this border is being painted
      * @param g the paint graphics
      * @param x the x position of the painted border
@@ -77,7 +78,10 @@
 
     /**
      * Returns the insets of the border.
+     *
      * @param c the component for which this border insets value applies
+     * @return an {@code Insets} object containing the insets from top, left,
+     *         bottom and right of this {@code Border}
      */
     Insets getBorderInsets(Component c);
 
@@ -85,6 +89,8 @@
      * Returns whether or not the border is opaque.  If the border
      * is opaque, it is responsible for filling in it's own
      * background when painting.
+     *
+     * @return true if this {@code Border} is opaque
      */
     boolean isBorderOpaque();
 }
--- a/jdk/src/share/classes/javax/swing/border/CompoundBorder.java	Mon May 19 10:34:42 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/border/CompoundBorder.java	Mon May 19 10:43:09 2014 +0400
@@ -155,6 +155,8 @@
 
     /**
      * Returns the outside border object.
+     *
+     * @return the outside {@code Border} object
      */
     public Border getOutsideBorder() {
         return outsideBorder;
@@ -162,6 +164,8 @@
 
     /**
      * Returns the inside border object.
+     *
+     * @return the inside {@code Border} object
      */
     public Border getInsideBorder() {
         return insideBorder;
--- a/jdk/src/share/classes/javax/swing/border/EmptyBorder.java	Mon May 19 10:34:42 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/border/EmptyBorder.java	Mon May 19 10:43:09 2014 +0400
@@ -98,6 +98,9 @@
 
     /**
      * Returns the insets of the border.
+     *
+     * @return an {@code Insets} object containing the insets from top, left,
+     *         bottom and right
      * @since 1.3
      */
     public Insets getBorderInsets() {
--- a/jdk/src/share/classes/javax/swing/border/EtchedBorder.java	Mon May 19 10:34:42 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/border/EtchedBorder.java	Mon May 19 10:43:09 2014 +0400
@@ -77,6 +77,7 @@
      * whose colors will be derived
      * from the background color of the component passed into
      * the paintBorder method.
+     *
      * @param etchType the type of etch to be drawn by the border
      */
     public EtchedBorder(int etchType)    {
@@ -86,6 +87,7 @@
     /**
      * Creates a lowered etched border with the specified highlight and
      * shadow colors.
+     *
      * @param highlight the color to use for the etched highlight
      * @param shadow the color to use for the etched shadow
      */
@@ -96,6 +98,7 @@
     /**
      * Creates an etched border with the specified etch-type,
      * highlight and shadow colors.
+     *
      * @param etchType the type of etch to be drawn by the border
      * @param highlight the color to use for the etched highlight
      * @param shadow the color to use for the etched shadow
@@ -110,6 +113,7 @@
     /**
      * Paints the border for the specified component with the
      * specified position and size.
+     *
      * @param c the component for which this border is being painted
      * @param g the paint graphics
      * @param x the x position of the painted border
@@ -138,6 +142,7 @@
 
     /**
      * Reinitialize the insets parameter with this Border's current Insets.
+     *
      * @param c the component for which this border insets value applies
      * @param insets the object to be reinitialized
      */
@@ -148,11 +153,16 @@
 
     /**
      * Returns whether or not the border is opaque.
+     * This implementation returns true.
+     *
+     * @return true
      */
     public boolean isBorderOpaque() { return true; }
 
     /**
      * Returns which etch-type is set on the etched border.
+     *
+     * @return the etched border type, either {@code RAISED} or {@code LOWERED}
      */
     public int getEtchType() {
         return etchType;
@@ -163,7 +173,9 @@
      * when rendered on the specified component.  If no highlight
      * color was specified at instantiation, the highlight color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the highlight may be derived
+     * @return the highlight {@code Color} of this {@code EtchedBorder}
      * @since 1.3
      */
     public Color getHighlightColor(Component c)   {
@@ -175,6 +187,9 @@
      * Returns the highlight color of the etched border.
      * Will return null if no highlight color was specified
      * at instantiation.
+     *
+     * @return the highlight {@code Color} of this {@code EtchedBorder} or null
+     *         if none was specified
      * @since 1.3
      */
     public Color getHighlightColor()   {
@@ -186,7 +201,9 @@
      * when rendered on the specified component.  If no shadow
      * color was specified at instantiation, the shadow color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the shadow may be derived
+     * @return the shadow {@code Color} of this {@code EtchedBorder}
      * @since 1.3
      */
     public Color getShadowColor(Component c)   {
@@ -197,6 +214,9 @@
      * Returns the shadow color of the etched border.
      * Will return null if no shadow color was specified
      * at instantiation.
+     *
+     * @return the shadow {@code Color} of this {@code EtchedBorder} or null
+     *         if none was specified
      * @since 1.3
      */
     public Color getShadowColor()   {
--- a/jdk/src/share/classes/javax/swing/border/LineBorder.java	Mon May 19 10:34:42 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/border/LineBorder.java	Mon May 19 10:43:09 2014 +0400
@@ -60,8 +60,11 @@
     protected Color lineColor;
     protected boolean roundedCorners;
 
-    /** Convenience method for getting the Color.black LineBorder of thickness 1.
-      */
+    /**
+     * Convenience method for getting the Color.black LineBorder of thickness 1.
+     *
+     * @return a {@code LineBorder} with {@code Color.black} and thickness of 1
+     */
     public static Border createBlackLineBorder() {
         if (blackLine == null) {
             blackLine = new LineBorder(Color.black, 1);
@@ -69,8 +72,11 @@
         return blackLine;
     }
 
-    /** Convenience method for getting the Color.gray LineBorder of thickness 1.
-      */
+    /**
+     * Convenience method for getting the Color.gray LineBorder of thickness 1.
+     *
+     * @return a {@code LineBorder} with {@code Color.gray} and thickness of 1
+     */
     public static Border createGrayLineBorder() {
         if (grayLine == null) {
             grayLine = new LineBorder(Color.gray, 1);
@@ -81,6 +87,7 @@
     /**
      * Creates a line border with the specified color and a
      * thickness = 1.
+     *
      * @param color the color for the border
      */
     public LineBorder(Color color) {
@@ -89,6 +96,7 @@
 
     /**
      * Creates a line border with the specified color and thickness.
+     *
      * @param color the color of the border
      * @param thickness the thickness of the border
      */
@@ -99,6 +107,7 @@
     /**
      * Creates a line border with the specified color, thickness,
      * and corner shape.
+     *
      * @param color the color of the border
      * @param thickness the thickness of the border
      * @param roundedCorners whether or not border corners should be round
@@ -114,6 +123,7 @@
     /**
      * Paints the border for the specified component with the
      * specified position and size.
+     *
      * @param c the component for which this border is being painted
      * @param g the paint graphics
      * @param x the x position of the painted border
@@ -152,6 +162,7 @@
 
     /**
      * Reinitialize the insets parameter with this Border's current Insets.
+     *
      * @param c the component for which this border insets value applies
      * @param insets the object to be reinitialized
      */
@@ -162,6 +173,8 @@
 
     /**
      * Returns the color of the border.
+     *
+     * @return a {@code Color} object representing the color of this object
      */
     public Color getLineColor()     {
         return lineColor;
@@ -169,6 +182,8 @@
 
     /**
      * Returns the thickness of the border.
+     *
+     * @return the thickness of this border
      */
     public int getThickness()       {
         return thickness;
@@ -176,6 +191,8 @@
 
     /**
      * Returns whether this border will be drawn with rounded corners.
+     *
+     * @return {@code true} if this border should have rounded corners
      * @since 1.3
      */
     public boolean getRoundedCorners() {
@@ -184,6 +201,8 @@
 
     /**
      * Returns whether or not the border is opaque.
+     *
+     * @return {@code true} if the border is opaque, {@code false} otherwise
      */
     public boolean isBorderOpaque() {
         return !roundedCorners;
--- a/jdk/src/share/classes/javax/swing/border/MatteBorder.java	Mon May 19 10:34:42 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/border/MatteBorder.java	Mon May 19 10:43:09 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -196,6 +196,9 @@
     /**
      * Returns the color used for tiling the border or null
      * if a tile icon is being used.
+     *
+     * @return the {@code Color} object used to render the border or {@code null}
+     *         if a tile icon is used
      * @since 1.3
      */
     public Color getMatteColor() {
@@ -205,6 +208,9 @@
    /**
      * Returns the icon used for tiling the border or null
      * if a solid color is being used.
+     *
+     * @return the {@code Icon} used to tile the border or {@code null} if a
+     *         solid color is used to fill the border
      * @since 1.3
      */
     public Icon getTileIcon() {
@@ -213,6 +219,8 @@
 
     /**
      * Returns whether or not the border is opaque.
+     *
+     * @return {@code true} if the border is opaque, {@code false} otherwise
      */
     public boolean isBorderOpaque() {
         // If a tileIcon is set, then it may contain transparent bits