diff --git a/jdk/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java b/jdk/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java index 7523c64e85f..993ca5c200e 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java @@ -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. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/AbstractListModel.java b/jdk/src/java.desktop/share/classes/javax/swing/AbstractListModel.java index e4956670ee0..71a8895d37e 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/AbstractListModel.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/AbstractListModel.java @@ -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 implements ListModel, Serializable { + /** + * The listener list. + */ protected EventListenerList listenerList = new EventListenerList(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/ButtonGroup.java b/jdk/src/java.desktop/share/classes/javax/swing/ButtonGroup.java index 21c13a49cbb..190c1d06d46 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/ButtonGroup.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/ButtonGroup.java @@ -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 buttons = new Vector(); /** diff --git a/jdk/src/java.desktop/share/classes/javax/swing/DefaultFocusManager.java b/jdk/src/java.desktop/share/classes/javax/swing/DefaultFocusManager.java index 502fc6c7f42..f2647794dc6 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultFocusManager.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultFocusManager.java @@ -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); } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java b/jdk/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java index 3cc567480c1..31bb7dd6596 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java @@ -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; /** diff --git a/jdk/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java b/jdk/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java index 671b1a412f0..a055b515651 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java @@ -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) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java b/jdk/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java index 532639c071f..023e9f3db5a 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java @@ -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) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/DesktopManager.java b/jdk/src/java.desktop/share/classes/javax/swing/DesktopManager.java index 5e08a6f139d..1c336368c34 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/DesktopManager.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/DesktopManager.java @@ -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 f will be a JInternalFrame. * * @param f the {@code JComponent} being resized + * @param direction the direction */ void beginResizingFrame(JComponent f, int direction); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JColorChooser.java b/jdk/src/java.desktop/share/classes/javax/swing/JColorChooser.java index c277e7eb9ae..6903e111b66 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JColorChooser.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JColorChooser.java @@ -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; /** diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java index 3cf186574ca..744535d77b8 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java @@ -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; } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JList.java b/jdk/src/java.desktop/share/classes/javax/swing/JList.java index 7d7c167314b..82ba88e3311 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JList.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JList.java @@ -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 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 extends JComponent implements Scrollable, Accessible private ListModel listModel; private ListCellRenderer cellRenderer = null; + /** + * Constructs an {@code AccessibleJListChild}. + * @param parent the parent + * @param indexInParent the index in the parent + */ public AccessibleJListChild(JList parent, int indexInParent) { this.parent = parent; this.setAccessibleParent(parent); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java index 56d3430ce3e..dd2c4a95621 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java @@ -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; } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java index 9bb7f00f14b..b25c877cc94 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java @@ -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(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/UIDefaults.java b/jdk/src/java.desktop/share/classes/javax/swing/UIDefaults.java index 95cdb149aa9..d529f6976a7 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/UIDefaults.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/UIDefaults.java @@ -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 /** Key bindings are registered under. */ private Object[] bindings; + /** + * Constructs a {@code LazyInputMap}. + * @param bindings the bindings + */ public LazyInputMap(Object[] bindings) { this.bindings = bindings; }