changeset 11773:c635728b87b4

8075082: Fix missing doclint warnings in the javax.swing package Reviewed-by: serb, ant
author darcy
date Wed, 15 Apr 2015 10:24:01 -0700
parents 2ca1d772b1f1
children e2499fc6e4b8
files src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java src/java.desktop/share/classes/javax/swing/AbstractListModel.java src/java.desktop/share/classes/javax/swing/ButtonGroup.java src/java.desktop/share/classes/javax/swing/DefaultFocusManager.java src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java src/java.desktop/share/classes/javax/swing/DesktopManager.java src/java.desktop/share/classes/javax/swing/JColorChooser.java src/java.desktop/share/classes/javax/swing/JEditorPane.java src/java.desktop/share/classes/javax/swing/JList.java src/java.desktop/share/classes/javax/swing/JTable.java src/java.desktop/share/classes/javax/swing/ToolTipManager.java src/java.desktop/share/classes/javax/swing/UIDefaults.java
diffstat 14 files changed, 171 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, 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
@@ -53,7 +53,13 @@
 @SuppressWarnings("serial") // Same-version serialization only
 public abstract class AbstractCellEditor implements CellEditor, Serializable {
 
+    /**
+     * The list of listeners.
+     */
     protected EventListenerList listenerList = new EventListenerList();
+    /**
+     * The change event.
+     */
     transient protected ChangeEvent changeEvent = null;
 
     // Force this to be implemented.
--- a/src/java.desktop/share/classes/javax/swing/AbstractListModel.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/AbstractListModel.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -50,6 +50,9 @@
 @SuppressWarnings("serial") // Same-version serialization only
 public abstract class AbstractListModel<E> implements ListModel<E>, Serializable
 {
+    /**
+     * The listener list.
+     */
     protected EventListenerList listenerList = new EventListenerList();
 
 
--- a/src/java.desktop/share/classes/javax/swing/ButtonGroup.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/ButtonGroup.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -69,7 +69,9 @@
 @SuppressWarnings("serial")
 public class ButtonGroup implements Serializable {
 
-    // the list of buttons participating in this group
+    /**
+     * The list of buttons participating in this group.
+     */
     protected Vector<AbstractButton> buttons = new Vector<AbstractButton>();
 
     /**
--- a/src/java.desktop/share/classes/javax/swing/DefaultFocusManager.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/DefaultFocusManager.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -57,10 +57,19 @@
     private final LayoutComparator comparator =
         new LayoutComparator();
 
+    /**
+     * Constructs a {@code DefaultFocusManager}.
+     */
     public DefaultFocusManager() {
         setDefaultFocusTraversalPolicy(gluePolicy);
     }
 
+    /**
+     * Returns the component after.
+     * @return the component after
+     * @param aContainer a container
+     * @param aComponent a component
+     */
     public Component getComponentAfter(Container aContainer,
                                        Component aComponent)
     {
@@ -83,6 +92,12 @@
         return null;
     }
 
+    /**
+     * Returns the component before.
+     * @return the component before
+     * @param aContainer a container
+     * @param aComponent a component
+     */
     public Component getComponentBefore(Container aContainer,
                                         Component aComponent)
     {
@@ -105,6 +120,11 @@
         return null;
     }
 
+    /**
+     * Returns the first component.
+     * @return the first component
+     * @param aContainer a container
+     */
     public Component getFirstComponent(Container aContainer) {
         Container root = (aContainer.isFocusCycleRoot())
             ? aContainer
@@ -125,6 +145,11 @@
         return null;
     }
 
+    /**
+     * Returns the last component.
+     * @return the last component
+     * @param aContainer a container
+     */
     public Component getLastComponent(Container aContainer) {
         Container root = (aContainer.isFocusCycleRoot())
             ? aContainer
@@ -145,6 +170,12 @@
         return null;
     }
 
+    /**
+     * Compares the components by their focus traversal cycle order.
+     * @param a the first component
+     * @param b the second component
+     * @return a comparison of the components by their focus traversal cycle order
+     */
     public boolean compareTabOrder(Component a, Component b) {
         return (comparator.compare(a, b) < 0);
     }
--- a/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -84,6 +84,9 @@
     */
     private static final Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1);
     private static final Border DEFAULT_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1);
+    /**
+     * No focus border
+     */
     protected static Border noFocusBorder = DEFAULT_NO_FOCUS_BORDER;
 
     /**
--- a/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -68,8 +68,14 @@
     private int lastChangedIndex = MIN;
 
     private BitSet value = new BitSet(32);
+    /**
+     * The list of listeners.
+     */
     protected EventListenerList listenerList = new EventListenerList();
 
+    /**
+     * Whether or not the lead anchor notification is enabled.
+     */
     protected boolean leadAnchorNotificationEnabled = true;
 
     /** {@inheritDoc} */
@@ -139,6 +145,8 @@
 
     /**
      * Notifies listeners that we have ended a series of adjustments.
+     * @param isAdjusting true if this is the final change in a series of
+     *          adjustments
      */
     protected void fireValueChanged(boolean isAdjusting) {
         if (lastChangedIndex == MIN) {
--- a/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -47,7 +47,8 @@
 @SuppressWarnings("serial") // Same-version serialization only
 public class DefaultSingleSelectionModel implements SingleSelectionModel,
 Serializable {
-    /* Only one ModelChangeEvent is needed per model instance since the
+    /**
+     * Only one ModelChangeEvent is needed per model instance since the
      * event's only (read-only) state is the source property.  The source
      * of events generated here is always "this".
      */
@@ -57,12 +58,16 @@
 
     private int index = -1;
 
-    // implements javax.swing.SingleSelectionModel
+    /**
+     * {@inheritDoc}
+     */
     public int getSelectedIndex() {
         return index;
     }
 
-    // implements javax.swing.SingleSelectionModel
+    /**
+     * {@inheritDoc}
+     */
     public void setSelectedIndex(int index) {
         if (this.index != index) {
             this.index = index;
@@ -70,12 +75,16 @@
         }
     }
 
-    // implements javax.swing.SingleSelectionModel
+    /**
+     * {@inheritDoc}
+     */
     public void clearSelection() {
         setSelectedIndex(-1);
     }
 
-    // implements javax.swing.SingleSelectionModel
+    /**
+     * {@inheritDoc}
+     */
     public boolean isSelected() {
         boolean ret = false;
         if (getSelectedIndex() != -1) {
--- a/src/java.desktop/share/classes/javax/swing/DesktopManager.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/DesktopManager.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -145,6 +145,7 @@
      * necessary state.  Normally <b>f</b> will be a JInternalFrame.
      *
      * @param f  the {@code JComponent} being resized
+     * @param direction the direction
      */
     void beginResizingFrame(JComponent f, int direction);
 
--- a/src/java.desktop/share/classes/javax/swing/JColorChooser.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/JColorChooser.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -561,6 +561,9 @@
 // Accessibility support
 ////////////////
 
+    /**
+     * The accessible context.
+     */
     protected AccessibleContext accessibleContext = null;
 
     /**
--- a/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -726,6 +726,8 @@
      * URL's can be properly resolved.
      *
      * @param page  the URL of the page
+     * @return a stream for the URL which is about to be loaded
+     * @throws IOException if an I/O problem occurs
      */
     protected InputStream getStream(URL page) throws IOException {
         final URLConnection conn = page.openConnection();
@@ -1712,10 +1714,17 @@
 
         private AccessibleContext accessibleContext;
 
+        /**
+         * Returns the accessible text.
+         * @return the accessible text
+         */
         public AccessibleText getAccessibleText() {
             return new JEditorPaneAccessibleHypertextSupport();
         }
 
+        /**
+         * Constructs an {@code AccessibleJEditorPaneHTML}.
+         */
         protected AccessibleJEditorPaneHTML () {
             HTMLEditorKit kit = (HTMLEditorKit)JEditorPane.this.getEditorKit();
             accessibleContext = kit.getAccessibleContext();
@@ -1791,9 +1800,16 @@
     protected class JEditorPaneAccessibleHypertextSupport
     extends AccessibleJEditorPane implements AccessibleHypertext {
 
+        /**
+         * An HTML link.
+         */
         public class HTMLLink extends AccessibleHyperlink {
             Element element;
 
+            /**
+             * Constructs a {@code HTMLLink}.
+             * @param e the element
+             */
             public HTMLLink(Element e) {
                 element = e;
             }
--- a/src/java.desktop/share/classes/javax/swing/JList.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/JList.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -2890,6 +2890,9 @@
 
         int leadSelectionIndex;
 
+        /**
+         * Constructs an {@code AccessibleJList}.
+         */
         public AccessibleJList() {
             super();
             JList.this.addPropertyChangeListener(this);
@@ -3193,6 +3196,11 @@
             private ListModel<E> listModel;
             private ListCellRenderer<? super E> cellRenderer = null;
 
+            /**
+             * Constructs an {@code AccessibleJListChild}.
+             * @param parent the parent
+             * @param indexInParent the index in the parent
+             */
             public AccessibleJListChild(JList<E> parent, int indexInParent) {
                 this.parent = parent;
                 this.setAccessibleParent(parent);
--- a/src/java.desktop/share/classes/javax/swing/JTable.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/JTable.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -6798,12 +6798,25 @@
         protected class AccessibleJTableModelChange
             implements AccessibleTableModelChange {
 
+            /** The type */
             protected int type;
+            /** The first row */
             protected int firstRow;
+            /** The last row */
             protected int lastRow;
+            /** The first column */
             protected int firstColumn;
+            /** The last column */
             protected int lastColumn;
 
+            /**
+             * Constructs an {@code AccessibleJTableModelChange}.
+             * @param type the type
+             * @param firstRow the first row
+             * @param lastRow the last row
+             * @param firstColumn the first column
+             * @param lastColumn the last column
+             */
             protected AccessibleJTableModelChange(int type, int firstRow,
                                                   int lastRow, int firstColumn,
                                                   int lastColumn) {
@@ -6814,22 +6827,42 @@
                 this.lastColumn = lastColumn;
             }
 
+            /**
+             * Returns the type.
+             * @return the type
+             */
             public int getType() {
                 return type;
             }
 
+            /**
+             * Returns the first row.
+             * @return the first row
+             */
             public int getFirstRow() {
                 return firstRow;
             }
 
+            /**
+             * Returns the last row.
+             * @return the last row
+             */
             public int getLastRow() {
                 return lastRow;
             }
 
+            /**
+             * Returns the first column.
+             * @return the first column
+             */
             public int getFirstColumn() {
                 return firstColumn;
             }
 
+            /**
+             * Returns the last column.
+             * @return the last column
+             */
             public int getLastColumn() {
                 return lastColumn;
             }
--- a/src/java.desktop/share/classes/javax/swing/ToolTipManager.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/ToolTipManager.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -80,8 +80,13 @@
     private KeyStroke postTip;
     private KeyStroke hideTip;
 
-    // PENDING(ges)
+    /**
+     * Lightweight popup enabled.
+     */
     protected boolean lightWeightPopupEnabled = true;
+    /**
+     * Heavyweight popup enabled.
+     */
     protected boolean heavyWeightPopupEnabled = false;
 
     ToolTipManager() {
@@ -657,7 +662,13 @@
         }
     }
 
+    /**
+     * Inside timer action.
+     */
     protected class insideTimerAction implements ActionListener {
+        /**
+         * {@inheritDoc}
+         */
         public void actionPerformed(ActionEvent e) {
             if(insideComponent != null && insideComponent.isShowing()) {
                 // Lazy lookup
@@ -681,13 +692,25 @@
         }
     }
 
+    /**
+     * Outside timer action.
+     */
     protected class outsideTimerAction implements ActionListener {
+        /**
+         * {@inheritDoc}
+         */
         public void actionPerformed(ActionEvent e) {
             showImmediately = false;
         }
     }
 
+    /**
+     * Still inside timer action.
+     */
     protected class stillInsideTimerAction implements ActionListener {
+        /**
+         * {@inheritDoc}
+         */
         public void actionPerformed(ActionEvent e) {
             hideTipWindow();
             enterTimer.stop();
--- a/src/java.desktop/share/classes/javax/swing/UIDefaults.java	Wed Apr 15 14:38:13 2015 +0400
+++ b/src/java.desktop/share/classes/javax/swing/UIDefaults.java	Wed Apr 15 10:24:01 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -1191,6 +1191,10 @@
         /** Key bindings are registered under. */
         private Object[] bindings;
 
+        /**
+         * Constructs a {@code LazyInputMap}.
+         * @param bindings the bindings
+         */
         public LazyInputMap(Object[] bindings) {
             this.bindings = bindings;
         }