8076520: Fix missing doclint warnings in javax.swing.{table, tree, undo, plaf.{metal, nimbus, synth}}
Reviewed-by: alexsch
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java Fri Apr 03 10:41:34 2015 -0700
@@ -569,7 +569,9 @@
return super.createListSelectionListener(fc);
}
- // Obsolete class, not used in this version.
+ /**
+ * Obsolete class, not used in this version.
+ */
protected class SingleClickListener extends MouseAdapter {
/**
* Constructs an instance of {@code SingleClickListener}.
@@ -580,7 +582,9 @@
}
}
- // Obsolete class, not used in this version.
+ /**
+ * Obsolete class, not used in this version.
+ */
@SuppressWarnings("serial") // Superclass is not serializable across versions
protected class FileRenderer extends DefaultListCellRenderer {
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java Fri Apr 03 10:41:34 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -495,8 +495,16 @@
* control points and bezier curve anchors.
*/
protected static class PaintContext {
+ /**
+ * Cache mode.
+ */
protected static enum CacheMode {
- NO_CACHING, FIXED_SIZES, NINE_SQUARE_SCALE
+ /** No caching.*/
+ NO_CACHING,
+ /** Fixed sizes.*/
+ FIXED_SIZES,
+ /** Nine square scale.*/
+ NINE_SQUARE_SCALE
}
private static Insets EMPTY_INSETS = new Insets(0, 0, 0, 0);
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java Fri Apr 03 10:41:34 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -120,11 +120,17 @@
*/
public final class NimbusStyle extends SynthStyle {
/* Keys and scales for large/small/mini components, based on Apples sizes */
+ /** Large key */
public static final String LARGE_KEY = "large";
+ /** Small key */
public static final String SMALL_KEY = "small";
+ /** Mini key */
public static final String MINI_KEY = "mini";
+ /** Large scale */
public static final double LARGE_SCALE = 1.15;
+ /** Small scale */
public static final double SMALL_SCALE = 0.857;
+ /** Mini scale */
public static final double MINI_SCALE = 0.714;
/**
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthInternalFrameUI.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthInternalFrameUI.java Fri Apr 03 10:41:34 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -56,6 +56,10 @@
return new SynthInternalFrameUI((JInternalFrame)b);
}
+ /**
+ * Constructs a {@code SynthInternalFrameUI}.
+ * @param b an internal frame
+ */
protected SynthInternalFrameUI(JInternalFrame b) {
super(b);
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java Fri Apr 03 10:41:34 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -48,6 +48,11 @@
private boolean validMinimumThumbSize;
+ /**
+ * Returns a UI.
+ * @return a UI
+ * @param c a component
+ */
public static ComponentUI createUI(JComponent c) {
return new SynthScrollBarUI();
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSliderUI.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSliderUI.java Fri Apr 03 10:41:34 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -93,6 +93,10 @@
return new SynthSliderUI((JSlider)c);
}
+ /**
+ * Constructs a {@code SynthSliderUI}.
+ * @param c a slider
+ */
protected SynthSliderUI(JSlider c) {
super(c);
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/AbstractTableModel.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/AbstractTableModel.java Fri Apr 03 10:41:34 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
@@ -320,9 +320,8 @@
*
* If no such listeners exist, this method returns an empty array.
*
- * @param listenerType the type of listeners requested; this parameter
- * should specify an interface that descends from
- * <code>java.util.EventListener</code>
+ * @param <T> the listener type
+ * @param listenerType the type of listeners requested
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s on this component,
* or an empty array if no such
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableCellRenderer.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableCellRenderer.java Fri Apr 03 10:41:34 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
@@ -95,6 +95,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);
+ /**
+ * A border without focus.
+ */
protected static Border noFocusBorder = DEFAULT_NO_FOCUS_BORDER;
// We need a place to store the color the JLabel should be returned
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java Fri Apr 03 10:41:34 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
@@ -652,9 +652,8 @@
*
* If no such listeners exist, this method returns an empty array.
*
- * @param listenerType the type of listeners requested; this parameter
- * should specify an interface that descends from
- * <code>java.util.EventListener</code>
+ * @param <T> the listener type
+ * @param listenerType the type of listeners requested
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s on this model,
* or an empty array if no such
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableModel.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableModel.java Fri Apr 03 10:41:34 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
@@ -314,15 +314,7 @@
/**
* Obsolete as of Java 2 platform v1.3. Please use <code>setRowCount</code> instead.
- */
- /*
- * Sets the number of rows in the model. If the new size is greater
- * than the current size, new rows are added to the end of the model
- * If the new size is less than the current size, all
- * rows at index <code>rowCount</code> and greater are discarded.
- *
* @param rowCount the new number of rows
- * @see #setRowCount
*/
public void setNumRows(int rowCount) {
int old = getRowCount();
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java Fri Apr 03 10:41:34 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
@@ -281,14 +281,8 @@
/**
* Obsolete as of Java 2 platform v1.3. Real time repaints, in response to
* column dragging or resizing, are now unconditional.
- */
- /*
- * Sets whether the body of the table updates in real time when
- * a column is resized or dragged.
- *
- * @param flag true if tableView should update
- * the body of the table in real time
- * @see #getUpdateTableInRealTime
+ * @param flag true if tableView should update the body of the
+ * table in real time
*/
public void setUpdateTableInRealTime(boolean flag) {
updateTableInRealTime = flag;
@@ -297,15 +291,7 @@
/**
* Obsolete as of Java 2 platform v1.3. Real time repaints, in response to
* column dragging or resizing, are now unconditional.
- */
- /*
- * Returns true if the body of the table view updates in real
- * time when a column is resized or dragged. User can set this flag to
- * false to speed up the table's response to user resize or drag actions.
- * The default is true.
- *
* @return true if the table updates in real time
- * @see #setUpdateTableInRealTime
*/
public boolean getUpdateTableInRealTime() {
return updateTableInRealTime;
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java Fri Apr 03 10:41:34 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
@@ -477,6 +477,15 @@
return true;
}
+ /**
+ * Determine the offset.
+ * @param tree a <code>JTree</code> object
+ * @param value a value
+ * @param isSelected selection status
+ * @param expanded expansion status
+ * @param leaf leaf status
+ * @param row current row
+ */
protected void determineOffset(JTree tree, Object value,
boolean isSelected, boolean expanded,
boolean leaf, int row) {
@@ -653,6 +662,9 @@
// This should not be used. It will be removed when new API is
// allowed.
+ /**
+ * Do not use.
+ */
public void EditorContainer() {
setLayout(null);
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeModel.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeModel.java Fri Apr 03 10:41:34 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
@@ -657,9 +657,8 @@
*
* If no such listeners exist, this method returns an empty array.
*
- * @param listenerType the type of listeners requested; this parameter
- * should specify an interface that descends from
- * <code>java.util.EventListener</code>
+ * @param <T> the listener type
+ * @param listenerType the type of listeners requested
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s on this component,
* or an empty array if no such
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java Fri Apr 03 10:41:34 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
@@ -664,9 +664,8 @@
*
* If no such listeners exist, this method returns an empty array.
*
- * @param listenerType the type of listeners requested; this parameter
- * should specify an interface that descends from
- * <code>java.util.EventListener</code>
+ * @param <T> the listener type
+ * @param listenerType the type of listeners requested
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s on this component,
* or an empty array if no such
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/FixedHeightLayoutCache.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/FixedHeightLayoutCache.java Fri Apr 03 10:41:34 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
@@ -74,7 +74,9 @@
private Stack<Stack<TreePath>> tempStacks;
-
+ /**
+ * Constructs a {@code FixedHeightLayoutCache}.
+ */
public FixedHeightLayoutCache() {
super();
tempStacks = new Stack<Stack<TreePath>>();
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/VariableHeightLayoutCache.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/VariableHeightLayoutCache.java Fri Apr 03 10:41:34 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
@@ -88,6 +88,9 @@
private Stack<Stack<TreePath>> tempStacks;
+ /**
+ * Constructs a {@code VariableHeightLayoutCache}.
+ */
public VariableHeightLayoutCache() {
super();
tempStacks = new Stack<Stack<TreePath>>();
--- a/jdk/src/java.desktop/share/classes/javax/swing/undo/CompoundEdit.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/undo/CompoundEdit.java Fri Apr 03 10:41:34 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
@@ -45,6 +45,9 @@
*/
protected Vector<UndoableEdit> edits;
+ /**
+ * Constructs a {@code CompoundEdit}.
+ */
public CompoundEdit() {
super();
inProgress = true;
--- a/jdk/src/java.desktop/share/classes/javax/swing/undo/StateEdit.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/undo/StateEdit.java Fri Apr 03 10:41:34 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
@@ -59,6 +59,9 @@
public class StateEdit
extends AbstractUndoableEdit {
+ /**
+ * Obsolete RCS version identity.
+ */
protected static final String RCSID = "$Id: StateEdit.java,v 1.6 1997/10/01 20:05:51 sandipc Exp $";
//
@@ -114,6 +117,11 @@
init (anObject,name);
}
+ /**
+ * Initialize the state edit.
+ * @param anObject The object to watch for changing state
+ * @param name The presentation name to be used for this edit
+ */
protected void init (StateEditable anObject, String name) {
this.object = anObject;
this.preState = new Hashtable<Object, Object>(11);
--- a/jdk/src/java.desktop/share/classes/javax/swing/undo/UndoableEditSupport.java Fri Apr 03 16:59:24 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/undo/UndoableEditSupport.java Fri Apr 03 10:41:34 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, 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
@@ -34,9 +34,21 @@
* @author Ray Ryan
*/
public class UndoableEditSupport {
+ /**
+ * The update level.
+ */
protected int updateLevel;
+ /**
+ * The compound edit.
+ */
protected CompoundEdit compoundEdit;
+ /**
+ * The list of listeners.
+ */
protected Vector<UndoableEditListener> listeners;
+ /**
+ * The real source.
+ */
protected Object realSource;
/**