From 4849c4513c8fe48b5f2cbe748e318eb4a9e78483 Mon Sep 17 00:00:00 2001 From: cl Date: Wed, 9 Oct 2013 14:32:15 -0700 Subject: [PATCH] 8026021: more fix of javadoc errors and warnings reported by doclint, see the description Reviewed-by: anthony, serb --- .../classes/java/awt/GraphicsDevice.java | 2 +- src/share/classes/java/awt/GridBagLayout.java | 6 +-- .../classes/java/awt/LinearGradientPaint.java | 3 +- .../classes/java/awt/RadialGradientPaint.java | 12 ++++-- .../java/awt/font/LineBreakMeasurer.java | 8 ++-- .../classes/java/awt/font/MultipleMaster.java | 2 +- .../classes/java/awt/font/NumericShaper.java | 2 +- src/share/classes/java/awt/font/OpenType.java | 2 +- .../java/awt/geom/AffineTransform.java | 2 +- .../classes/java/awt/im/InputContext.java | 1 - src/share/classes/javax/swing/Action.java | 8 ++-- .../classes/javax/swing/GroupLayout.java | 8 ++-- .../javax/swing/text/JTextComponent.java | 38 +++++++++---------- .../javax/swing/text/StyleConstants.java | 2 +- .../javax/swing/text/html/HTMLDocument.java | 5 +-- .../swing/tree/DefaultTreeCellRenderer.java | 4 +- 16 files changed, 54 insertions(+), 51 deletions(-) diff --git a/src/share/classes/java/awt/GraphicsDevice.java b/src/share/classes/java/awt/GraphicsDevice.java index 5e3901a0d..17705fa01 100644 --- a/src/share/classes/java/awt/GraphicsDevice.java +++ b/src/share/classes/java/awt/GraphicsDevice.java @@ -162,7 +162,7 @@ public abstract class GraphicsDevice { * GraphicsEnvironment. Although there is * no public method to set this String, a programmer can * use the String for debugging purposes. Vendors of - * the JavaTM Runtime Environment can + * the Java™ Runtime Environment can * format the return value of the String. To determine * how to interpret the value of the String, contact the * vendor of your Java Runtime. To find out who the vendor is, from diff --git a/src/share/classes/java/awt/GridBagLayout.java b/src/share/classes/java/awt/GridBagLayout.java index 1362e57dd..aad3f709b 100644 --- a/src/share/classes/java/awt/GridBagLayout.java +++ b/src/share/classes/java/awt/GridBagLayout.java @@ -125,9 +125,9 @@ import java.util.Arrays; *
* - * - * - * + * + * + * * * * - * *

Absolute Values

Orientation Relative Values

Baseline Relative Values

Absolute Values

Orientation Relative Values

Baseline Relative Values

diff --git a/src/share/classes/java/awt/LinearGradientPaint.java b/src/share/classes/java/awt/LinearGradientPaint.java index e9fbcfc5d..f4af6026d 100644 --- a/src/share/classes/java/awt/LinearGradientPaint.java +++ b/src/share/classes/java/awt/LinearGradientPaint.java @@ -94,7 +94,8 @@ import java.beans.ConstructorProperties; * of the three cycle methods: *

*

- * LinearGradientPaint + * image showing the output of the example code *
* * @see java.awt.Paint diff --git a/src/share/classes/java/awt/RadialGradientPaint.java b/src/share/classes/java/awt/RadialGradientPaint.java index a0bf944b9..5fd08734f 100644 --- a/src/share/classes/java/awt/RadialGradientPaint.java +++ b/src/share/classes/java/awt/RadialGradientPaint.java @@ -80,14 +80,16 @@ import java.beans.ConstructorProperties; * from the focus point. The following figure shows that the distance AB * is equal to the distance BC, and the distance AD is equal to the distance DE. *
- * RadialGradientPaint-3 + * image showing the
+ * distance AB=BC, and AD=DE *
* If the gradient and graphics rendering transforms are uniformly scaled and * the user sets the focus so that it coincides with the center of the circle, * the gradient color proportions are equal for any line drawn from the center. * The following figure shows the distances AB, BC, AD, and DE. They are all equal. *
- * RadialGradientPaint-4 + * image showing the
+ * distance of AB, BC, AD, and DE are all equal *
* Note that some minor variations in distances may occur due to sampling at * the granularity of a pixel. @@ -117,7 +119,8 @@ import java.beans.ConstructorProperties; * (centered) focus for each of the three cycle methods: *

*

- * RadialGradientPaint-1 + * image showing the
+ * output of the sameple code *
* *

@@ -141,7 +144,8 @@ import java.beans.ConstructorProperties; * focus for each of the three cycle methods: *

*

- * RadialGradientPaint-2 + * image showing the
+ * output of the sample code *
* * @see java.awt.Paint diff --git a/src/share/classes/java/awt/font/LineBreakMeasurer.java b/src/share/classes/java/awt/font/LineBreakMeasurer.java index 2e2be83e5..0688ab419 100644 --- a/src/share/classes/java/awt/font/LineBreakMeasurer.java +++ b/src/share/classes/java/awt/font/LineBreakMeasurer.java @@ -112,7 +112,7 @@ import java.awt.font.FontRenderContext; * Examples:

* Rendering a paragraph in a component *

- *
+ * 
{@code
  * public void paint(Graphics graphics) {
  *
  *     Point2D pen = new Point2D(10, 20);
@@ -137,13 +137,13 @@ import java.awt.font.FontRenderContext;
  *         pen.y += layout.getDescent() + layout.getLeading();
  *     }
  * }
- * 
+ * }
*
*

* Rendering text with tabs. For simplicity, the overall text * direction is assumed to be left-to-right *

- *
+ * 
{@code
  * public void paint(Graphics graphics) {
  *
  *     float leftMargin = 10, rightMargin = 310;
@@ -240,7 +240,7 @@ import java.awt.font.FontRenderContext;
  *         verticalPos += maxDescent;
  *     }
  * }
- * 
+ * }
*
* @see TextLayout */ diff --git a/src/share/classes/java/awt/font/MultipleMaster.java b/src/share/classes/java/awt/font/MultipleMaster.java index 757ca01db..8c6726479 100644 --- a/src/share/classes/java/awt/font/MultipleMaster.java +++ b/src/share/classes/java/awt/font/MultipleMaster.java @@ -41,7 +41,7 @@ public interface MultipleMaster { public int getNumDesignAxes(); /** - * Returns an array of design limits interleaved in the form [from->to] + * Returns an array of design limits interleaved in the form [from→to] * for each axis. For example, * design limits for weight could be from 0.1 to 1.0. The values are * returned in the same order returned by diff --git a/src/share/classes/java/awt/font/NumericShaper.java b/src/share/classes/java/awt/font/NumericShaper.java index 7685e65f9..0de80e91f 100644 --- a/src/share/classes/java/awt/font/NumericShaper.java +++ b/src/share/classes/java/awt/font/NumericShaper.java @@ -1212,7 +1212,7 @@ public final class NumericShaper implements java.io.Serializable { * For example, to check if a shaper shapes to Arabic, you would use the * following: *
- * if ((shaper.getRanges() & shaper.ARABIC) != 0) { ... + * if ((shaper.getRanges() & shaper.ARABIC) != 0) { ... *
* *

Note that this method supports only the bit mask-based diff --git a/src/share/classes/java/awt/font/OpenType.java b/src/share/classes/java/awt/font/OpenType.java index a5bcdce3d..f186049b6 100644 --- a/src/share/classes/java/awt/font/OpenType.java +++ b/src/share/classes/java/awt/font/OpenType.java @@ -33,7 +33,7 @@ package java.awt.font; *

* For more information on TrueType and OpenType fonts, see the * OpenType specification. - * ( http://www.microsoft.com/typography/otspec/l ). + * ( http://www.microsoft.com/typography/otspec/ ). */ public interface OpenType { diff --git a/src/share/classes/java/awt/geom/AffineTransform.java b/src/share/classes/java/awt/geom/AffineTransform.java index 0977cf8ea..614bd726b 100644 --- a/src/share/classes/java/awt/geom/AffineTransform.java +++ b/src/share/classes/java/awt/geom/AffineTransform.java @@ -47,7 +47,7 @@ import java.beans.ConstructorProperties; * [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ] * *

- *

Handling 90-Degree Rotations

+ *

Handling 90-Degree Rotations

*

* In some variations of the rotate methods in the * AffineTransform class, a double-precision argument diff --git a/src/share/classes/java/awt/im/InputContext.java b/src/share/classes/java/awt/im/InputContext.java index e2223fcbc..615029120 100644 --- a/src/share/classes/java/awt/im/InputContext.java +++ b/src/share/classes/java/awt/im/InputContext.java @@ -98,7 +98,6 @@ public class InputContext { * an input method or keyboard layout has been successfully selected. The * following steps are taken until an input method has been selected: * - *

*

    *
  • * If the currently selected input method or keyboard layout supports the diff --git a/src/share/classes/javax/swing/Action.java b/src/share/classes/javax/swing/Action.java index 48c4b6a32..307f40a74 100644 --- a/src/share/classes/javax/swing/Action.java +++ b/src/share/classes/javax/swing/Action.java @@ -98,10 +98,10 @@ import java.beans.*; * summary="Supported Action properties" * valign="top" > *
Component Property - * Components - * Action Key - * Notes + * Component Property + * Components + * Action Key + * Notes *
enabled * All diff --git a/src/share/classes/javax/swing/GroupLayout.java b/src/share/classes/javax/swing/GroupLayout.java index ba29f7cdb..cde55a3bd 100644 --- a/src/share/classes/javax/swing/GroupLayout.java +++ b/src/share/classes/javax/swing/GroupLayout.java @@ -79,7 +79,7 @@ import static javax.swing.SwingConstants.VERTICAL; * The following diagram shows a sequential group along the horizontal * axis. The sequential group contains three components. A parallel group * was used along the vertical axis. - *

+ *

* *

* To reinforce that each axis is treated independently the diagram shows @@ -101,7 +101,7 @@ import static javax.swing.SwingConstants.VERTICAL; * parallel group along the horizontal axis and the sequential group along * the vertical axis. *

- *

+ *

* *

* As {@code c1} is the largest of the three components, the parallel @@ -115,7 +115,7 @@ import static javax.swing.SwingConstants.VERTICAL; *

* The following diagram shows a sequential group along both the horizontal * and vertical axis. - *

+ *

* *

* {@code GroupLayout} provides the ability to insert gaps between @@ -172,7 +172,7 @@ import static javax.swing.SwingConstants.VERTICAL; * *

* When run the following is produced. - *

+ *

* *

* This layout consists of the following. diff --git a/src/share/classes/javax/swing/text/JTextComponent.java b/src/share/classes/javax/swing/text/JTextComponent.java index 52052b7a8..aafc57eb3 100644 --- a/src/share/classes/javax/swing/text/JTextComponent.java +++ b/src/share/classes/javax/swing/text/JTextComponent.java @@ -160,9 +160,9 @@ import sun.swing.SwingAccessor; * * * - * - * - * + * + * + * * * * @@ -214,7 +214,7 @@ import sun.swing.SwingAccessor; * The text document model may be shared by other views which act as observers * of the model (e.g. a document may be shared by multiple components). * - *

Diagram showing interaction between Controller, Document, events, and ViewFactoryDiagram showing interaction between Controller, Document, events, and ViewFactory

* *

@@ -1399,8 +1399,8 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * Fetches a portion of the text represented by the * component. Returns an empty string if length is 0. * - * @param offs the offset >= 0 - * @param len the length >= 0 + * @param offs the offset ≥ 0 + * @param len the length ≥ 0 * @return the text * @exception BadLocationException if the offset or length are invalid */ @@ -1416,7 +1416,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * be computed until the component has been sized). The * component does not have to be visible or painted. * - * @param pos the position >= 0 + * @param pos the position ≥ 0 * @return the coordinates as a rectangle, with (r.x, r.y) as the location * in the coordinate system, or null if the component does * not yet have a positive size. @@ -1437,7 +1437,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * component does not have to be visible or painted. * * @param pt the location in the view to translate - * @return the offset >= 0 from the start of the document, + * @return the offset ≥ 0 from the start of the document, * or -1 if the component does not yet have a positive * size. * @see TextUI#viewToModel @@ -1688,7 +1688,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * text component. * * @return the position of the text insertion caret for the - * text component >= 0 + * text component ≥ 0 */ @Transient public int getCaretPosition() { @@ -1814,7 +1814,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * Returns the selected text's start position. Return 0 for an * empty document, or the value of dot if no selection. * - * @return the start position >= 0 + * @return the start position ≥ 0 */ @Transient public int getSelectionStart() { @@ -1832,7 +1832,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * This is implemented to forward to the Caret * implementation which is where the actual selection is maintained. * - * @param selectionStart the start position of the text >= 0 + * @param selectionStart the start position of the text ≥ 0 * @beaninfo * description: starting location of the selection. */ @@ -1847,7 +1847,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * Returns the selected text's end position. Return 0 if the document * is empty, or the value of dot if there is no selection. * - * @return the end position >= 0 + * @return the end position ≥ 0 */ @Transient public int getSelectionEnd() { @@ -1865,7 +1865,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * This is implemented to forward to the Caret * implementation which is where the actual selection is maintained. * - * @param selectionEnd the end position of the text >= 0 + * @param selectionEnd the end position of the text ≥ 0 * @beaninfo * description: ending location of the selection. */ @@ -2785,7 +2785,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * if the JTextComponent is contained in a JScrollPane in which * case the resulting rectangle should be composed with the parent * coordinates. A good algorithm to use is: - * + *

          * Accessible a:
          * AccessibleText at = a.getAccessibleText();
          * AccessibleComponent ac = a.getAccessibleComponent();
@@ -2793,14 +2793,14 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
          * Point p = ac.getLocation();
          * r.x += p.x;
          * r.y += p.y;
-         * 
+         * 
* * Note: the JTextComponent must have a valid size (e.g. have * been added to a parent container whose ancestor container * is a valid top-level window) for this method to be able * to return a meaningful (non-null) value. * - * @param i the index into the String >= 0 + * @param i the index into the String ≥ 0 * @return the screen coordinates of the character's bounding box */ public Rectangle getCharacterBounds(int i) { @@ -2844,7 +2844,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A /** * Returns the number of characters (valid indices) * - * @return the number of characters >= 0 + * @return the number of characters ≥ 0 */ public int getCharCount() { return model.getLength(); @@ -2895,7 +2895,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * Return 0 if the text is empty, or the caret position * if no selection. * - * @return the index into the text of the start of the selection >= 0 + * @return the index into the text of the start of the selection ≥ 0 */ public int getSelectionStart() { return JTextComponent.this.getSelectionStart(); @@ -2908,7 +2908,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * Return 0 if the text is empty, or the caret position * if no selection. * - * @return the index into teh text of the end of the selection >= 0 + * @return the index into teh text of the end of the selection ≥ 0 */ public int getSelectionEnd() { return JTextComponent.this.getSelectionEnd(); diff --git a/src/share/classes/javax/swing/text/StyleConstants.java b/src/share/classes/javax/swing/text/StyleConstants.java index 0bb73f25d..894b9fdc0 100644 --- a/src/share/classes/javax/swing/text/StyleConstants.java +++ b/src/share/classes/javax/swing/text/StyleConstants.java @@ -39,7 +39,7 @@ import javax.swing.Icon; * All sizes are specified in points (such as found in postscript), a * device independent measure. *

- *

Diagram shows SpaceAbove, FirstLineIndent, LeftIndent, RightIndent,
  *      and SpaceBelow a paragraph.

*

diff --git a/src/share/classes/javax/swing/text/html/HTMLDocument.java b/src/share/classes/javax/swing/text/html/HTMLDocument.java index abbee8037..5a26b1328 100644 --- a/src/share/classes/javax/swing/text/html/HTMLDocument.java +++ b/src/share/classes/javax/swing/text/html/HTMLDocument.java @@ -184,7 +184,6 @@ import static sun.swing.SwingUtilities2.IMPLIED_CR; * of various methods described above.

* *

Stage

KeyEvent

InputMethodEvent

Stage

KeyEvent

InputMethodEvent

1. input methods (generated here)
- * * * * @@ -262,8 +261,8 @@ import static sun.swing.SwingUtilities2.IMPLIED_CR; * not be compatible with future Swing releases. The current * serialization support is appropriate for short term storage or RMI * between applications running the same version of Swing. As of 1.4, - * support for long term storage of all JavaBeansTM has been added to the + * support for long term storage of all JavaBeans™ + * has been added to the * java.beans package. Please see {@link * java.beans.XMLEncoder}.

* diff --git a/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java b/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java index 942d6d6de..ad2a86bad 100644 --- a/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java +++ b/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java @@ -62,8 +62,8 @@ import sun.swing.DefaultLookup; * {@code DefaultTreeCellRenderer} property and defaults table key: *
ExampleinsertAfterStart
* - *
Property: - * Key: + * Property: + * Key: *
"leafIcon""Tree.leafIcon" *
"closedIcon""Tree.closedIcon" *
"openIcon""Tree.openIcon" -- GitLab