Hello,

Please review this fix for

    JDK-8076422: Fix missing doclint warnings in javax.swing.border
    http://cr.openjdk.java.net/~darcy/8076422.0/

which adds in some missing javadoc in the javax.swing.border package.

Patch below.

Thanks,

-Joe

--- old/src/java.desktop/share/classes/javax/swing/border/BevelBorder.java 2015-03-31 18:12:02.790087803 -0700 +++ new/src/java.desktop/share/classes/javax/swing/border/BevelBorder.java 2015-03-31 18:12:02.646087800 -0700
@@ -52,10 +52,25 @@
     /** Lowered bevel type. */
     public static final int LOWERED = 1;

+    /**
+     * The bevel type.
+     */
     protected int bevelType;
+    /**
+     * The color to use for the bevel outer highlight.
+     */
     protected Color highlightOuter;
+    /**
+     * The color to use for the bevel inner highlight.
+     */
     protected Color highlightInner;
+    /**
+     * The color to use for the bevel inner shadow.
+     */
     protected Color shadowInner;
+    /**
+     * the color to use for the bevel outer shadow
+     */
     protected Color shadowOuter;

     /**
@@ -262,6 +277,17 @@
      */
     public boolean isBorderOpaque() { return true; }

+    /**
+     * Paints a raised bevel for the specified component with the specified
+     * position and size.
+     *
+     * @param c the component for which the raised bevel is being painted
+     * @param g the paint graphics
+     * @param x the x position of the raised bevel
+     * @param y the y position of the raised bevel
+     * @param width the width of the raised bevel
+     * @param height the height of the raised bevel
+     */
     protected void paintRaisedBevel(Component c, Graphics g, int x, int y,
                                     int width, int height)  {
         Color oldColor = g.getColor();
@@ -291,6 +317,17 @@

     }

+    /**
+ * Paints a lowered bevel for the specified component with the specified
+     * position and size.
+     *
+     * @param c the component for which the lowered bevel is being painted
+     * @param g the paint graphics
+     * @param x the x position of the lowered bevel
+     * @param y the y position of the lowered bevel
+     * @param width the width of the lowered bevel
+     * @param height the height of the lowered bevel
+     */
protected void paintLoweredBevel(Component c, Graphics g, int x, int y,
                                         int width, int height)  {
         Color oldColor = g.getColor();
--- old/src/java.desktop/share/classes/javax/swing/border/CompoundBorder.java 2015-03-31 18:12:03.198087813 -0700 +++ new/src/java.desktop/share/classes/javax/swing/border/CompoundBorder.java 2015-03-31 18:12:03.050087809 -0700
@@ -56,7 +56,13 @@
  */
 @SuppressWarnings("serial")
 public class CompoundBorder extends AbstractBorder {
+    /**
+     * The outside border.
+     */
     protected Border outsideBorder;
+    /**
+     * The inside border.
+     */
     protected Border insideBorder;

     /**
--- old/src/java.desktop/share/classes/javax/swing/border/EmptyBorder.java 2015-03-31 18:12:03.582087821 -0700 +++ new/src/java.desktop/share/classes/javax/swing/border/EmptyBorder.java 2015-03-31 18:12:03.442087818 -0700
@@ -49,7 +49,22 @@
 @SuppressWarnings("serial")
 public class EmptyBorder extends AbstractBorder implements Serializable
 {
-    protected int left, right, top, bottom;
+    /**
+     * The left inset of the border.
+     */
+    protected int left;
+    /**
+     * The right inset of the border.
+     */
+    protected int right;
+    /**
+     * The top inset of the border.
+     */
+    protected int top;
+    /**
+     * The bottom inset of the border.
+     */
+    protected int bottom;

     /**
      * Creates an empty border with the specified insets.
--- old/src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java 2015-03-31 18:12:03.966087830 -0700 +++ new/src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java 2015-03-31 18:12:03.826087827 -0700
@@ -59,8 +59,17 @@
     /** Lowered etched type. */
     public static final int LOWERED = 1;

+    /**
+     * The type of etch to be drawn by the border.
+     */
     protected int etchType;
+    /**
+     * The color to use for the etched highlight.
+     */
     protected Color highlight;
+    /**
+     * The color to use for the etched shadow.
+     */
     protected Color shadow;

     /**
--- old/src/java.desktop/share/classes/javax/swing/border/LineBorder.java 2015-03-31 18:12:04.354087839 -0700 +++ new/src/java.desktop/share/classes/javax/swing/border/LineBorder.java 2015-03-31 18:12:04.214087836 -0700
@@ -56,8 +56,17 @@
     private static Border blackLine;
     private static Border grayLine;

+    /**
+     * Thickness of the border.
+     */
     protected int thickness;
+    /**
+     * Color of the border.
+     */
     protected Color lineColor;
+    /**
+     * Whether or not the border has rounded corners.
+     */
     protected boolean roundedCorners;

     /**
--- old/src/java.desktop/share/classes/javax/swing/border/MatteBorder.java 2015-03-31 18:12:04.754087849 -0700 +++ new/src/java.desktop/share/classes/javax/swing/border/MatteBorder.java 2015-03-31 18:12:04.602087845 -0700
@@ -49,7 +49,13 @@
 @SuppressWarnings("serial")
 public class MatteBorder extends EmptyBorder
 {
+    /**
+     * The color rendered for the border.
+     */
     protected Color color;
+    /**
+     * The icon to be used for tiling the border.
+     */
     protected Icon tileIcon;

     /**
--- old/src/java.desktop/share/classes/javax/swing/border/TitledBorder.java 2015-03-31 18:12:05.162087858 -0700 +++ new/src/java.desktop/share/classes/javax/swing/border/TitledBorder.java 2015-03-31 18:12:04.998087854 -0700
@@ -70,11 +70,29 @@
 @SuppressWarnings("serial")
 public class TitledBorder extends AbstractBorder
 {
+    /**
+     * The title the border should display.
+     */
     protected String title;
+    /**
+     * The border.
+     */
     protected Border border;
+    /**
+     * The position for the title.
+     */
     protected int titlePosition;
+    /**
+     * The justification for the title.
+     */
     protected int titleJustification;
+    /**
+     * The font for rendering the title.
+     */
     protected Font titleFont;
+    /**
+     * The color of the title.
+     */
     protected Color titleColor;

     private final JLabel label;
@@ -117,13 +135,19 @@
      */
     static public final int     TRAILING = 5;

-    // Space between the border and the component's edge
+    /**
+     * Space between the border and the component's edge
+     */
     static protected final int EDGE_SPACING = 2;

-    // Space between the border and text
+    /**
+     * Space between the border and text
+     */
     static protected final int TEXT_SPACING = 2;

-    // Horizontal inset of text that is left or right justified
+    /**
+     * Horizontal inset of text that is left or right justified
+     */
     static protected final int TEXT_INSET_H = 5;

     /**
@@ -676,6 +700,11 @@
         return justification;
     }

+    /**
+     * Returns the font of the component.
+     * @return the font of the component
+     * @param c the component
+     */
     protected Font getFont(Component c) {
         Font font = getTitleFont();
         if (font != null) {

Reply via email to