From 42ea78224f18eb2b21dddff006cda3f8fed88833 Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 27 Sep 2013 12:35:43 +0400 Subject: [PATCH] 8025249: [javadoc] fix some javadoc errors in javax/swing/ Reviewed-by: alexsch, yan Contributed-by: Taras Ledkov --- .../javax/swing/border/CompoundBorder.java | 4 +- .../AbstractColorChooserPanel.java | 6 +- .../classes/javax/swing/event/CaretEvent.java | 4 +- .../javax/swing/event/DocumentEvent.java | 6 +- .../javax/swing/event/EventListenerList.java | 2 +- .../javax/swing/event/ListDataEvent.java | 4 +- .../javax/swing/event/TreeModelEvent.java | 8 +- .../javax/swing/filechooser/FileView.java | 6 +- .../swing/table/DefaultTableCellRenderer.java | 2 +- .../javax/swing/table/DefaultTableModel.java | 5 +- .../javax/swing/table/JTableHeader.java | 10 +- .../javax/swing/table/TableCellRenderer.java | 8 +- .../javax/swing/text/AbstractDocument.java | 106 +++++++++--------- .../javax/swing/text/AbstractWriter.java | 4 +- .../javax/swing/text/AsyncBoxView.java | 50 ++++----- .../javax/swing/text/AttributeSet.java | 2 +- .../classes/javax/swing/text/Document.java | 22 ++-- .../classes/javax/swing/text/Element.java | 14 +-- src/share/classes/javax/swing/text/View.java | 62 +++++----- 19 files changed, 162 insertions(+), 163 deletions(-) diff --git a/src/share/classes/javax/swing/border/CompoundBorder.java b/src/share/classes/javax/swing/border/CompoundBorder.java index 56371a47a..a0143670e 100644 --- a/src/share/classes/javax/swing/border/CompoundBorder.java +++ b/src/share/classes/javax/swing/border/CompoundBorder.java @@ -37,11 +37,11 @@ import java.beans.ConstructorProperties; * For example, this class may be used to add blank margin space * to a component with an existing decorative border: *

- *

+ * 
  *    Border border = comp.getBorder();
  *    Border margin = new EmptyBorder(10,10,10,10);
  *    comp.setBorder(new CompoundBorder(border, margin));
- * 
+ *
*

* Warning: * Serialized objects of this class will not be compatible with diff --git a/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java b/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java index 99a20e38f..2a3b0c0c4 100644 --- a/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java +++ b/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java @@ -85,7 +85,7 @@ public abstract class AbstractColorChooserPanel extends JPanel { /** * Provides a hint to the look and feel as to the * KeyEvent.VK constant that can be used as a mnemonic to - * access the panel. A return value <= 0 indicates there is no mnemonic. + * access the panel. A return value <= 0 indicates there is no mnemonic. *

* The return value here is a hint, it is ultimately up to the look * and feel to honor the return value in some meaningful way. @@ -94,7 +94,7 @@ public abstract class AbstractColorChooserPanel extends JPanel { * AbstractColorChooserPanel does not support a mnemonic, * subclasses wishing a mnemonic will need to override this. * - * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no + * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no * mnemonic * @see #getDisplayedMnemonicIndex * @since 1.4 @@ -107,7 +107,7 @@ public abstract class AbstractColorChooserPanel extends JPanel { * Provides a hint to the look and feel as to the index of the character in * getDisplayName that should be visually identified as the * mnemonic. The look and feel should only use this if - * getMnemonic returns a value > 0. + * getMnemonic returns a value > 0. *

* The return value here is a hint, it is ultimately up to the look * and feel to honor the return value in some meaningful way. For example, diff --git a/src/share/classes/javax/swing/event/CaretEvent.java b/src/share/classes/javax/swing/event/CaretEvent.java index 7b47eb3f7..6cb3164b6 100644 --- a/src/share/classes/javax/swing/event/CaretEvent.java +++ b/src/share/classes/javax/swing/event/CaretEvent.java @@ -56,7 +56,7 @@ public abstract class CaretEvent extends EventObject { /** * Fetches the location of the caret. * - * @return the dot >= 0 + * @return the dot >= 0 */ public abstract int getDot(); @@ -65,7 +65,7 @@ public abstract class CaretEvent extends EventObject { * selection. If there is no selection, this * will be the same as dot. * - * @return the mark >= 0 + * @return the mark >= 0 */ public abstract int getMark(); } diff --git a/src/share/classes/javax/swing/event/DocumentEvent.java b/src/share/classes/javax/swing/event/DocumentEvent.java index 707e698b6..9c9c796f8 100644 --- a/src/share/classes/javax/swing/event/DocumentEvent.java +++ b/src/share/classes/javax/swing/event/DocumentEvent.java @@ -45,14 +45,14 @@ public interface DocumentEvent { * Returns the offset within the document of the start * of the change. * - * @return the offset >= 0 + * @return the offset >= 0 */ public int getOffset(); /** * Returns the length of the change. * - * @return the length >= 0 + * @return the length >= 0 */ public int getLength(); @@ -155,7 +155,7 @@ public interface DocumentEvent { * This is the location that children were added * and/or removed. * - * @return the index >= 0 + * @return the index >= 0 */ public int getIndex(); diff --git a/src/share/classes/javax/swing/event/EventListenerList.java b/src/share/classes/javax/swing/event/EventListenerList.java index 237bf2067..004659ad2 100644 --- a/src/share/classes/javax/swing/event/EventListenerList.java +++ b/src/share/classes/javax/swing/event/EventListenerList.java @@ -69,7 +69,7 @@ import java.lang.reflect.Array; * Object[] listeners = listenerList.getListenerList(); * // Process the listeners last to first, notifying * // those that are interested in this event - * for (int i = listeners.length-2; i>=0; i-=2) { + * for (int i = listeners.length-2; i>=0; i-=2) { * if (listeners[i]==FooListener.class) { * // Lazily create the event: * if (fooEvent == null) diff --git a/src/share/classes/javax/swing/event/ListDataEvent.java b/src/share/classes/javax/swing/event/ListDataEvent.java index 3ccf01e1a..8862e724e 100644 --- a/src/share/classes/javax/swing/event/ListDataEvent.java +++ b/src/share/classes/javax/swing/event/ListDataEvent.java @@ -85,9 +85,9 @@ public class ListDataEvent extends EventObject public int getIndex1() { return index1; } /** - * Constructs a ListDataEvent object. If index0 is > + * Constructs a ListDataEvent object. If index0 is > * index1, index0 and index1 will be swapped such that - * index0 will always be <= index1. + * index0 will always be <= index1. * * @param source the source Object (typically this) * @param type an int specifying {@link #CONTENTS_CHANGED}, diff --git a/src/share/classes/javax/swing/event/TreeModelEvent.java b/src/share/classes/javax/swing/event/TreeModelEvent.java index 3c92dc163..6c6d7cef4 100644 --- a/src/share/classes/javax/swing/event/TreeModelEvent.java +++ b/src/share/classes/javax/swing/event/TreeModelEvent.java @@ -101,14 +101,14 @@ public class TreeModelEvent extends EventObject { * of initial-positions, you then need to convert the Vector of Integer * objects to an array of int to create the event. *

- * Notes: