8075082: Fix missing doclint warnings in the javax.swing package
Reviewed-by: serb, ant
This commit is contained in:
parent
0dc8a46204
commit
342ea6369a
@ -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 @@ import java.io.Serializable;
|
||||
@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.
|
||||
|
@ -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 @@ import java.util.EventListener;
|
||||
@SuppressWarnings("serial") // Same-version serialization only
|
||||
public abstract class AbstractListModel<E> implements ListModel<E>, Serializable
|
||||
{
|
||||
/**
|
||||
* The listener list.
|
||||
*/
|
||||
protected EventListenerList listenerList = new EventListenerList();
|
||||
|
||||
|
||||
|
@ -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 @@ import java.io.Serializable;
|
||||
@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>();
|
||||
|
||||
/**
|
||||
|
@ -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 @@ public class DefaultFocusManager extends FocusManager {
|
||||
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 @@ public class DefaultFocusManager extends FocusManager {
|
||||
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 @@ public class DefaultFocusManager extends FocusManager {
|
||||
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 @@ public class DefaultFocusManager extends FocusManager {
|
||||
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 @@ public class DefaultFocusManager extends FocusManager {
|
||||
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);
|
||||
}
|
||||
|
@ -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 @@ public class DefaultListCellRenderer extends JLabel
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -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 @@ public class DefaultListSelectionModel implements ListSelectionModel, Cloneable,
|
||||
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 @@ public class DefaultListSelectionModel implements ListSelectionModel, Cloneable,
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
|
@ -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 @@ import java.util.EventListener;
|
||||
@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 @@ Serializable {
|
||||
|
||||
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 @@ Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
// implements javax.swing.SingleSelectionModel
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void clearSelection() {
|
||||
setSelectedIndex(-1);
|
||||
}
|
||||
|
||||
// implements javax.swing.SingleSelectionModel
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public boolean isSelected() {
|
||||
boolean ret = false;
|
||||
if (getSelectedIndex() != -1) {
|
||||
|
@ -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 @@ public interface DesktopManager
|
||||
* 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);
|
||||
|
||||
|
@ -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 @@ public class JColorChooser extends JComponent implements Accessible {
|
||||
// Accessibility support
|
||||
////////////////
|
||||
|
||||
/**
|
||||
* The accessible context.
|
||||
*/
|
||||
protected AccessibleContext accessibleContext = null;
|
||||
|
||||
/**
|
||||
|
@ -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 @@ public class JEditorPane extends JTextComponent {
|
||||
* 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 @@ public class JEditorPane extends JTextComponent {
|
||||
|
||||
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 @@ public class JEditorPane extends JTextComponent {
|
||||
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;
|
||||
}
|
||||
|
@ -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 @@ public class JList<E> extends JComponent implements Scrollable, Accessible
|
||||
|
||||
int leadSelectionIndex;
|
||||
|
||||
/**
|
||||
* Constructs an {@code AccessibleJList}.
|
||||
*/
|
||||
public AccessibleJList() {
|
||||
super();
|
||||
JList.this.addPropertyChangeListener(this);
|
||||
@ -3193,6 +3196,11 @@ public class JList<E> extends JComponent implements Scrollable, Accessible
|
||||
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);
|
||||
|
@ -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 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
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 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
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;
|
||||
}
|
||||
|
@ -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 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
|
||||
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 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
|
@ -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 @@ public class UIDefaults extends Hashtable<Object,Object>
|
||||
/** Key bindings are registered under. */
|
||||
private Object[] bindings;
|
||||
|
||||
/**
|
||||
* Constructs a {@code LazyInputMap}.
|
||||
* @param bindings the bindings
|
||||
*/
|
||||
public LazyInputMap(Object[] bindings) {
|
||||
this.bindings = bindings;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user