8043967: Fix doclint warnings for java.awt
Reviewed-by: pchelko
Contributed-by: Alexander Stepanov <alexander.v.stepanov@oracle.com>
--- a/jdk/src/share/classes/java/awt/AWTEvent.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/AWTEvent.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -388,6 +388,8 @@
/**
* Returns the event type.
+ *
+ * @return the event's type id
*/
public int getID() {
return id;
@@ -446,6 +448,9 @@
/**
* Returns whether this event has been consumed.
+ *
+ * @return {@code true} if this event has been consumed;
+ * otherwise {@code false}
*/
protected boolean isConsumed() {
return consumed;
--- a/jdk/src/share/classes/java/awt/AWTEventMulticaster.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/AWTEventMulticaster.java Tue Jun 24 16:57:02 2014 +0400
@@ -110,7 +110,15 @@
TextListener, InputMethodListener, HierarchyListener,
HierarchyBoundsListener, MouseWheelListener {
- protected final EventListener a, b;
+ /**
+ * A variable in the event chain (listener-a)
+ */
+ protected final EventListener a;
+
+ /**
+ * A variable in the event chain (listener-b)
+ */
+ protected final EventListener b;
/**
* Creates an event multicaster instance which chains listener-a
@@ -537,6 +545,7 @@
* returns the resulting multicast listener.
* @param a component-listener-a
* @param b component-listener-b
+ * @return the resulting listener
*/
public static ComponentListener add(ComponentListener a, ComponentListener b) {
return (ComponentListener)addInternal(a, b);
@@ -547,6 +556,7 @@
* returns the resulting multicast listener.
* @param a container-listener-a
* @param b container-listener-b
+ * @return the resulting listener
*/
public static ContainerListener add(ContainerListener a, ContainerListener b) {
return (ContainerListener)addInternal(a, b);
@@ -557,6 +567,7 @@
* returns the resulting multicast listener.
* @param a focus-listener-a
* @param b focus-listener-b
+ * @return the resulting listener
*/
public static FocusListener add(FocusListener a, FocusListener b) {
return (FocusListener)addInternal(a, b);
@@ -567,6 +578,7 @@
* returns the resulting multicast listener.
* @param a key-listener-a
* @param b key-listener-b
+ * @return the resulting listener
*/
public static KeyListener add(KeyListener a, KeyListener b) {
return (KeyListener)addInternal(a, b);
@@ -577,6 +589,7 @@
* returns the resulting multicast listener.
* @param a mouse-listener-a
* @param b mouse-listener-b
+ * @return the resulting listener
*/
public static MouseListener add(MouseListener a, MouseListener b) {
return (MouseListener)addInternal(a, b);
@@ -587,6 +600,7 @@
* returns the resulting multicast listener.
* @param a mouse-motion-listener-a
* @param b mouse-motion-listener-b
+ * @return the resulting listener
*/
public static MouseMotionListener add(MouseMotionListener a, MouseMotionListener b) {
return (MouseMotionListener)addInternal(a, b);
@@ -597,6 +611,7 @@
* returns the resulting multicast listener.
* @param a window-listener-a
* @param b window-listener-b
+ * @return the resulting listener
*/
public static WindowListener add(WindowListener a, WindowListener b) {
return (WindowListener)addInternal(a, b);
@@ -607,6 +622,7 @@
* and returns the resulting multicast listener.
* @param a window-state-listener-a
* @param b window-state-listener-b
+ * @return the resulting listener
* @since 1.4
*/
@SuppressWarnings("overloads")
@@ -620,6 +636,7 @@
* and returns the resulting multicast listener.
* @param a window-focus-listener-a
* @param b window-focus-listener-b
+ * @return the resulting listener
* @since 1.4
*/
public static WindowFocusListener add(WindowFocusListener a,
@@ -632,6 +649,7 @@
* returns the resulting multicast listener.
* @param a action-listener-a
* @param b action-listener-b
+ * @return the resulting listener
*/
@SuppressWarnings("overloads")
public static ActionListener add(ActionListener a, ActionListener b) {
@@ -643,6 +661,7 @@
* returns the resulting multicast listener.
* @param a item-listener-a
* @param b item-listener-b
+ * @return the resulting listener
*/
@SuppressWarnings("overloads")
public static ItemListener add(ItemListener a, ItemListener b) {
@@ -654,11 +673,21 @@
* returns the resulting multicast listener.
* @param a adjustment-listener-a
* @param b adjustment-listener-b
+ * @return the resulting listener
*/
@SuppressWarnings("overloads")
public static AdjustmentListener add(AdjustmentListener a, AdjustmentListener b) {
return (AdjustmentListener)addInternal(a, b);
}
+
+ /**
+ * Adds text-listener-a with text-listener-b and
+ * returns the resulting multicast listener.
+ *
+ * @param a text-listener-a
+ * @param b text-listener-b
+ * @return the resulting listener
+ */
@SuppressWarnings("overloads")
public static TextListener add(TextListener a, TextListener b) {
return (TextListener)addInternal(a, b);
@@ -669,6 +698,7 @@
* returns the resulting multicast listener.
* @param a input-method-listener-a
* @param b input-method-listener-b
+ * @return the resulting listener
*/
public static InputMethodListener add(InputMethodListener a, InputMethodListener b) {
return (InputMethodListener)addInternal(a, b);
@@ -679,6 +709,7 @@
* returns the resulting multicast listener.
* @param a hierarchy-listener-a
* @param b hierarchy-listener-b
+ * @return the resulting listener
* @since 1.3
*/
@SuppressWarnings("overloads")
@@ -691,6 +722,7 @@
* returns the resulting multicast listener.
* @param a hierarchy-bounds-listener-a
* @param b hierarchy-bounds-listener-b
+ * @return the resulting listener
* @since 1.3
*/
public static HierarchyBoundsListener add(HierarchyBoundsListener a, HierarchyBoundsListener b) {
@@ -702,6 +734,7 @@
* returns the resulting multicast listener.
* @param a mouse-wheel-listener-a
* @param b mouse-wheel-listener-b
+ * @return the resulting listener
* @since 1.4
*/
@SuppressWarnings("overloads")
@@ -715,6 +748,7 @@
* returns the resulting multicast listener.
* @param l component-listener-l
* @param oldl the component-listener being removed
+ * @return the resulting listener
*/
public static ComponentListener remove(ComponentListener l, ComponentListener oldl) {
return (ComponentListener) removeInternal(l, oldl);
@@ -725,6 +759,7 @@
* returns the resulting multicast listener.
* @param l container-listener-l
* @param oldl the container-listener being removed
+ * @return the resulting listener
*/
public static ContainerListener remove(ContainerListener l, ContainerListener oldl) {
return (ContainerListener) removeInternal(l, oldl);
@@ -735,6 +770,7 @@
* returns the resulting multicast listener.
* @param l focus-listener-l
* @param oldl the focus-listener being removed
+ * @return the resulting listener
*/
public static FocusListener remove(FocusListener l, FocusListener oldl) {
return (FocusListener) removeInternal(l, oldl);
@@ -745,6 +781,7 @@
* returns the resulting multicast listener.
* @param l key-listener-l
* @param oldl the key-listener being removed
+ * @return the resulting listener
*/
public static KeyListener remove(KeyListener l, KeyListener oldl) {
return (KeyListener) removeInternal(l, oldl);
@@ -755,6 +792,7 @@
* returns the resulting multicast listener.
* @param l mouse-listener-l
* @param oldl the mouse-listener being removed
+ * @return the resulting listener
*/
public static MouseListener remove(MouseListener l, MouseListener oldl) {
return (MouseListener) removeInternal(l, oldl);
@@ -765,6 +803,7 @@
* and returns the resulting multicast listener.
* @param l mouse-motion-listener-l
* @param oldl the mouse-motion-listener being removed
+ * @return the resulting listener
*/
public static MouseMotionListener remove(MouseMotionListener l, MouseMotionListener oldl) {
return (MouseMotionListener) removeInternal(l, oldl);
@@ -775,6 +814,7 @@
* returns the resulting multicast listener.
* @param l window-listener-l
* @param oldl the window-listener being removed
+ * @return the resulting listener
*/
public static WindowListener remove(WindowListener l, WindowListener oldl) {
return (WindowListener) removeInternal(l, oldl);
@@ -785,6 +825,7 @@
* and returns the resulting multicast listener.
* @param l window-state-listener-l
* @param oldl the window-state-listener being removed
+ * @return the resulting listener
* @since 1.4
*/
@SuppressWarnings("overloads")
@@ -798,6 +839,7 @@
* and returns the resulting multicast listener.
* @param l window-focus-listener-l
* @param oldl the window-focus-listener being removed
+ * @return the resulting listener
* @since 1.4
*/
public static WindowFocusListener remove(WindowFocusListener l,
@@ -810,6 +852,7 @@
* returns the resulting multicast listener.
* @param l action-listener-l
* @param oldl the action-listener being removed
+ * @return the resulting listener
*/
@SuppressWarnings("overloads")
public static ActionListener remove(ActionListener l, ActionListener oldl) {
@@ -821,6 +864,7 @@
* returns the resulting multicast listener.
* @param l item-listener-l
* @param oldl the item-listener being removed
+ * @return the resulting listener
*/
@SuppressWarnings("overloads")
public static ItemListener remove(ItemListener l, ItemListener oldl) {
@@ -832,11 +876,21 @@
* returns the resulting multicast listener.
* @param l adjustment-listener-l
* @param oldl the adjustment-listener being removed
+ * @return the resulting listener
*/
@SuppressWarnings("overloads")
public static AdjustmentListener remove(AdjustmentListener l, AdjustmentListener oldl) {
return (AdjustmentListener) removeInternal(l, oldl);
}
+
+ /**
+ * Removes the old text-listener from text-listener-l and
+ * returns the resulting multicast listener.
+ *
+ * @param l text-listener-l
+ * @param oldl the text-listener being removed
+ * @return the resulting listener
+ */
@SuppressWarnings("overloads")
public static TextListener remove(TextListener l, TextListener oldl) {
return (TextListener) removeInternal(l, oldl);
@@ -847,6 +901,7 @@
* returns the resulting multicast listener.
* @param l input-method-listener-l
* @param oldl the input-method-listener being removed
+ * @return the resulting listener
*/
public static InputMethodListener remove(InputMethodListener l, InputMethodListener oldl) {
return (InputMethodListener) removeInternal(l, oldl);
@@ -857,6 +912,7 @@
* returns the resulting multicast listener.
* @param l hierarchy-listener-l
* @param oldl the hierarchy-listener being removed
+ * @return the resulting listener
* @since 1.3
*/
@SuppressWarnings("overloads")
@@ -870,6 +926,7 @@
* listener.
* @param l hierarchy-bounds-listener-l
* @param oldl the hierarchy-bounds-listener being removed
+ * @return the resulting listener
* @since 1.3
*/
public static HierarchyBoundsListener remove(HierarchyBoundsListener l, HierarchyBoundsListener oldl) {
@@ -881,6 +938,7 @@
* and returns the resulting multicast listener.
* @param l mouse-wheel-listener-l
* @param oldl the mouse-wheel-listener being removed
+ * @return the resulting listener
* @since 1.4
*/
@SuppressWarnings("overloads")
@@ -898,6 +956,7 @@
* a new AWTEventMulticaster instance which chains a with b.
* @param a event listener-a
* @param b event listener-b
+ * @return the resulting listener
*/
protected static EventListener addInternal(EventListener a, EventListener b) {
if (a == null) return b;
@@ -915,6 +974,7 @@
* Else, returns listener l.
* @param l the listener being removed from
* @param oldl the listener being removed
+ * @return the resulting listener
*/
protected static EventListener removeInternal(EventListener l, EventListener oldl) {
if (l == oldl || l == null) {
@@ -927,9 +987,14 @@
}
- /* Serialization support.
- */
-
+ /**
+ * Serialization support. Saves all Serializable listeners
+ * to a serialization stream.
+ *
+ * @param s the stream to save to
+ * @param k a prefix stream to put before each serializable listener
+ * @throws IOException if serialization fails
+ */
protected void saveInternal(ObjectOutputStream s, String k) throws IOException {
if (a instanceof AWTEventMulticaster) {
((AWTEventMulticaster)a).saveInternal(s, k);
@@ -948,6 +1013,14 @@
}
}
+ /**
+ * Saves a Serializable listener chain to a serialization stream.
+ *
+ * @param s the stream to save to
+ * @param k a prefix stream to put before each serializable listener
+ * @param l the listener chain to save
+ * @throws IOException if serialization fails
+ */
protected static void save(ObjectOutputStream s, String k, EventListener l) throws IOException {
if (l == null) {
return;
--- a/jdk/src/share/classes/java/awt/AWTKeyStroke.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/AWTKeyStroke.java Tue Jun 24 16:57:02 2014 +0400
@@ -802,6 +802,7 @@
* <code>AWTKeyStroke</code>) which is equal to this instance.
*
* @return a cached instance which is equal to this instance
+ * @throws java.io.ObjectStreamException if a serialization problem occurs
*/
protected Object readResolve() throws java.io.ObjectStreamException {
synchronized (AWTKeyStroke.class) {
--- a/jdk/src/share/classes/java/awt/AlphaComposite.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/AlphaComposite.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -621,7 +621,9 @@
/**
* Creates an <code>AlphaComposite</code> object with the specified rule.
+ *
* @param rule the compositing rule
+ * @return the {@code AlphaComposite} object created
* @throws IllegalArgumentException if <code>rule</code> is not one of
* the following: {@link #CLEAR}, {@link #SRC}, {@link #DST},
* {@link #SRC_OVER}, {@link #DST_OVER}, {@link #SRC_IN},
@@ -664,10 +666,12 @@
* the constant alpha to multiply with the alpha of the source.
* The source is multiplied with the specified alpha before being composited
* with the destination.
+ *
* @param rule the compositing rule
* @param alpha the constant alpha to be multiplied with the alpha of
* the source. <code>alpha</code> must be a floating point number in the
* inclusive range [0.0, 1.0].
+ * @return the {@code AlphaComposite} object created
* @throws IllegalArgumentException if
* <code>alpha</code> is less than 0.0 or greater than 1.0, or if
* <code>rule</code> is not one of
--- a/jdk/src/share/classes/java/awt/BorderLayout.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/BorderLayout.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -367,6 +367,8 @@
/**
* Returns the horizontal gap between components.
+ *
+ * @return the horizontal gap between components
* @since 1.1
*/
public int getHgap() {
@@ -375,6 +377,7 @@
/**
* Sets the horizontal gap between components.
+ *
* @param hgap the horizontal gap between components
* @since 1.1
*/
@@ -384,6 +387,8 @@
/**
* Returns the vertical gap between components.
+ *
+ * @return the vertical gap between components
* @since 1.1
*/
public int getVgap() {
@@ -392,6 +397,7 @@
/**
* Sets the vertical gap between components.
+ *
* @param vgap the vertical gap between components
* @since 1.1
*/
--- a/jdk/src/share/classes/java/awt/Button.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Button.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -238,6 +238,8 @@
* Returns the command name of the action event fired by this button.
* If the command name is <code>null</code> (default) then this method
* returns the label of the button.
+ *
+ * @return the action command name (or label) for this button
*/
public String getActionCommand() {
return (actionCommand == null? label : actionCommand);
--- a/jdk/src/share/classes/java/awt/Checkbox.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Checkbox.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -713,6 +713,9 @@
*/
private static final long serialVersionUID = 7881579233144754107L;
+ /**
+ * Constructor for {@code AccessibleAWTCheckbox}
+ */
public AccessibleAWTCheckbox() {
super();
Checkbox.this.addItemListener(this);
--- a/jdk/src/share/classes/java/awt/CheckboxGroup.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/CheckboxGroup.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -91,6 +91,10 @@
}
/**
+ * Returns the current choice from this check box group
+ * or {@code null} if none of checkboxes are selected.
+ *
+ * @return the selected checkbox
* @deprecated As of JDK version 1.1,
* replaced by <code>getSelectedCheckbox()</code>.
*/
@@ -120,6 +124,11 @@
}
/**
+ * Sets the currently selected check box in this group
+ * to be the specified check box and unsets all others.
+ *
+ * @param box the {@code Checkbox} to set as the
+ * current selection.
* @deprecated As of JDK version 1.1,
* replaced by <code>setSelectedCheckbox(Checkbox)</code>.
*/
--- a/jdk/src/share/classes/java/awt/Choice.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Choice.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -156,6 +156,7 @@
/**
* Returns the number of items in this <code>Choice</code> menu.
+ *
* @return the number of items in this <code>Choice</code> menu
* @see #getItem
* @since 1.1
@@ -165,6 +166,9 @@
}
/**
+ * Returns the number of items in this {@code Choice} menu.
+ *
+ * @return the number of items in this {@code Choice} menu
* @deprecated As of JDK version 1.1,
* replaced by <code>getItemCount()</code>.
*/
@@ -176,8 +180,10 @@
/**
* Gets the string at the specified index in this
* <code>Choice</code> menu.
- * @param index the index at which to begin
- * @see #getItemCount
+ *
+ * @param index the index at which to begin
+ * @return the item at the specified index
+ * @see #getItemCount
*/
public String getItem(int index) {
return getItemImpl(index);
@@ -759,6 +765,9 @@
*/
private static final long serialVersionUID = 7175603582428509322L;
+ /**
+ * Constructor for {@code AccessibleAWTChoice}
+ */
public AccessibleAWTChoice() {
super();
}
--- a/jdk/src/share/classes/java/awt/Component.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Component.java Tue Jun 24 16:57:02 2014 +0400
@@ -1075,6 +1075,7 @@
* @deprecated As of JDK version 1.1,
* programs should not directly manipulate peers;
* replaced by <code>boolean isDisplayable()</code>.
+ * @return the peer for this component
*/
@Deprecated
public ComponentPeer getPeer() {
@@ -1132,6 +1133,8 @@
/**
* Gets the <code>DropTarget</code> associated with this
* <code>Component</code>.
+ *
+ * @return the drop target
*/
public synchronized DropTarget getDropTarget() { return dropTarget; }
@@ -1498,6 +1501,11 @@
}
/**
+ * Enables or disables this component.
+ *
+ * @param b {@code true} to enable this component;
+ * otherwise {@code false}
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>setEnabled(boolean)</code>.
*/
@@ -1656,6 +1664,11 @@
}
/**
+ * Makes this component visible or invisible.
+ *
+ * @param b {@code true} to make this component visible;
+ * otherwise {@code false}
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>setVisible(boolean)</code>.
*/
@@ -2068,6 +2081,9 @@
/**
+ * Returns the location of this component's top left corner.
+ *
+ * @return the location of this component's top left corner
* @deprecated As of JDK version 1.1,
* replaced by <code>getLocation()</code>.
*/
@@ -2102,6 +2118,13 @@
}
/**
+ * Moves this component to a new location.
+ *
+ * @param x the <i>x</i>-coordinate of the new location's
+ * top-left corner in the parent's coordinate space
+ * @param y the <i>y</i>-coordinate of the new location's
+ * top-left corner in the parent's coordinate space
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>setLocation(int, int)</code>.
*/
@@ -2150,6 +2173,11 @@
}
/**
+ * Returns the size of this component in the form of a
+ * {@code Dimension} object.
+ *
+ * @return the {@code Dimension} object that indicates the
+ * size of this component
* @deprecated As of JDK version 1.1,
* replaced by <code>getSize()</code>.
*/
@@ -2177,6 +2205,10 @@
}
/**
+ * Resizes this component.
+ *
+ * @param width the new width of the component
+ * @param height the new height of the component
* @deprecated As of JDK version 1.1,
* replaced by <code>setSize(int, int)</code>.
*/
@@ -2208,6 +2240,10 @@
}
/**
+ * Resizes this component so that it has width {@code d.width}
+ * and height {@code d.height}.
+ *
+ * @param d the new size of this component
* @deprecated As of JDK version 1.1,
* replaced by <code>setSize(Dimension)</code>.
*/
@@ -2231,6 +2267,9 @@
}
/**
+ * Returns the bounding rectangle of this component.
+ *
+ * @return the bounding rectangle for this component
* @deprecated As of JDK version 1.1,
* replaced by <code>getBounds()</code>.
*/
@@ -2265,6 +2304,13 @@
}
/**
+ * Reshapes the bounding rectangle for this component.
+ *
+ * @param x the <i>x</i> coordinate of the upper left corner of the rectangle
+ * @param y the <i>y</i> coordinate of the upper left corner of the rectangle
+ * @param width the width of the rectangle
+ * @param height the height of the rectangle
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>setBounds(int, int, int, int)</code>.
*/
@@ -2631,6 +2677,9 @@
/**
+ * Returns the component's preferred size.
+ *
+ * @return the component's preferred size
* @deprecated As of JDK version 1.1,
* replaced by <code>getPreferredSize()</code>.
*/
@@ -2701,6 +2750,9 @@
}
/**
+ * Returns the minimum size of this component.
+ *
+ * @return the minimum size of this component
* @deprecated As of JDK version 1.1,
* replaced by <code>getMinimumSize()</code>.
*/
@@ -2781,6 +2833,8 @@
* components. The value should be a number between 0 and 1
* where 0 represents alignment along the origin, 1 is aligned
* the furthest away from the origin, 0.5 is centered, etc.
+ *
+ * @return the horizontal alignment of this component
*/
public float getAlignmentX() {
return CENTER_ALIGNMENT;
@@ -2792,6 +2846,8 @@
* components. The value should be a number between 0 and 1
* where 0 represents alignment along the origin, 1 is aligned
* the furthest away from the origin, 0.5 is centered, etc.
+ *
+ * @return the vertical alignment of this component
*/
public float getAlignmentY() {
return CENTER_ALIGNMENT;
@@ -3157,8 +3213,10 @@
* not have a cursor set, the cursor of its parent is returned.
* If no cursor is set in the entire hierarchy,
* <code>Cursor.DEFAULT_CURSOR</code> is returned.
+ *
+ * @return the cursor for this component
* @see #setCursor
- * @since 1.1
+ * @since 1.1
*/
public Cursor getCursor() {
return getCursor_NoClientCode();
@@ -3942,6 +4000,7 @@
* a lost state.
*/
protected boolean validatedContents; // = false
+
/**
* Size of the back buffers. (Note: these fields were added in 6.0
* but kept package-private to avoid exposing them in the spec.
@@ -3949,7 +4008,15 @@
* protected when they were introduced in 1.4, but now we just have
* to live with that decision.)
*/
+
+ /**
+ * The width of the back buffers
+ */
int width;
+
+ /**
+ * The height of the back buffers
+ */
int height;
/**
@@ -4304,6 +4371,8 @@
/**
* Creates the back buffers
+ *
+ * @param numBuffers the number of buffers to create
*/
protected void createBackBuffers(int numBuffers) {
if (numBuffers == 0) {
@@ -4593,6 +4662,9 @@
* better performance is desired, or if page-flipping is used as the
* buffer strategy.
*
+ * @param ignoreRepaint {@code true} if the paint messages from the OS
+ * should be ignored; otherwise {@code false}
+ *
* @since 1.4
* @see #getIgnoreRepaint
* @see Canvas#createBufferStrategy
@@ -4619,8 +4691,11 @@
* Checks whether this component "contains" the specified point,
* where <code>x</code> and <code>y</code> are defined to be
* relative to the coordinate system of this component.
+ *
* @param x the <i>x</i> coordinate of the point
* @param y the <i>y</i> coordinate of the point
+ * @return {@code true} if the point is within the component;
+ * otherwise {@code false}
* @see #getComponentAt(int, int)
* @since 1.1
*/
@@ -4629,6 +4704,12 @@
}
/**
+ * Checks whether the point is inside of this component.
+ *
+ * @param x the <i>x</i> coordinate of the point
+ * @param y the <i>y</i> coordinate of the point
+ * @return {@code true} if the point is within the component;
+ * otherwise {@code false}
* @deprecated As of JDK version 1.1,
* replaced by contains(int, int).
*/
@@ -4641,7 +4722,10 @@
* Checks whether this component "contains" the specified point,
* where the point's <i>x</i> and <i>y</i> coordinates are defined
* to be relative to the coordinate system of this component.
+ *
* @param p the point
+ * @return {@code true} if the point is within the component;
+ * otherwise {@code false}
* @throws NullPointerException if {@code p} is {@code null}
* @see #getComponentAt(Point)
* @since 1.1
@@ -4676,6 +4760,13 @@
}
/**
+ * Returns the component occupying the position specified (this component,
+ * or immediate child component, or null if neither
+ * of the first two occupies the location).
+ *
+ * @param x the <i>x</i> coordinate to search for components at
+ * @param y the <i>y</i> coordinate to search for components at
+ * @return the component at the specified location or {@code null}
* @deprecated As of JDK version 1.1,
* replaced by getComponentAt(int, int).
*/
@@ -4687,15 +4778,17 @@
/**
* Returns the component or subcomponent that contains the
* specified point.
- * @param p the point
- * @see java.awt.Component#contains
- * @since 1.1
+ * @param p the point
+ * @return the component at the specified location or {@code null}
+ * @see java.awt.Component#contains
+ * @since 1.1
*/
public Component getComponentAt(Point p) {
return getComponentAt(p.x, p.y);
}
/**
+ * @param e the event to deliver
* @deprecated As of JDK version 1.1,
* replaced by <code>dispatchEvent(AWTEvent e)</code>.
*/
@@ -6746,6 +6839,8 @@
}
/**
+ * @param evt the event to handle
+ * @return {@code true} if the event was handled, {@code false} otherwise
* @deprecated As of JDK version 1.1
* replaced by processEvent(AWTEvent).
*/
@@ -6789,6 +6884,10 @@
}
/**
+ * @param evt the event to handle
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processMouseEvent(MouseEvent).
*/
@@ -6798,6 +6897,10 @@
}
/**
+ * @param evt the event to handle
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processMouseMotionEvent(MouseEvent).
*/
@@ -6807,6 +6910,10 @@
}
/**
+ * @param evt the event to handle
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processMouseEvent(MouseEvent).
*/
@@ -6816,6 +6923,10 @@
}
/**
+ * @param evt the event to handle
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processMouseMotionEvent(MouseEvent).
*/
@@ -6825,6 +6936,10 @@
}
/**
+ * @param evt the event to handle
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processMouseEvent(MouseEvent).
*/
@@ -6834,6 +6949,10 @@
}
/**
+ * @param evt the event to handle
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processMouseEvent(MouseEvent).
*/
@@ -6843,6 +6962,9 @@
}
/**
+ * @param evt the event to handle
+ * @param key the key pressed
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processKeyEvent(KeyEvent).
*/
@@ -6852,6 +6974,9 @@
}
/**
+ * @param evt the event to handle
+ * @param key the key pressed
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processKeyEvent(KeyEvent).
*/
@@ -6861,6 +6986,9 @@
}
/**
+ * @param evt the event to handle
+ * @param what the object acted on
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* should register this component as ActionListener on component
* which fires action events.
@@ -7070,6 +7198,9 @@
}
/**
+ * @param evt the event to handle
+ * @param what the object focused
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processFocusEvent(FocusEvent).
*/
@@ -7079,6 +7210,9 @@
}
/**
+ * @param evt the event to handle
+ * @param what the object focused
+ * @return {@code false}
* @deprecated As of JDK version 1.1,
* replaced by processFocusEvent(FocusEvent).
*/
@@ -8390,6 +8524,7 @@
* Returns an array of all the listeners which have been associated
* with the named property.
*
+ * @param propertyName the property name
* @return all of the <code>PropertyChangeListener</code>s associated with
* the named property; if no such listeners have been added or
* if <code>propertyName</code> is <code>null</code>, an empty
@@ -8400,8 +8535,7 @@
* @see #getPropertyChangeListeners
* @since 1.4
*/
- public PropertyChangeListener[] getPropertyChangeListeners(
- String propertyName) {
+ public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) {
synchronized (getObjectLock()) {
if (changeSupport == null) {
return new PropertyChangeListener[0];
@@ -8879,6 +9013,7 @@
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
+ * @param o the orientation to be set
*
* @see ComponentOrientation
* @see #invalidate
@@ -8906,6 +9041,7 @@
* subclasses that wish to respect orientation should call this method to
* get the component's orientation before performing layout or drawing.
*
+ * @return the orientation to order the elements or text
* @see ComponentOrientation
*
* @author Laura Werner, IBM
@@ -9063,7 +9199,16 @@
*/
private volatile transient int propertyListenersCount = 0;
+ /**
+ * A component listener to track show/hide/resize events
+ * and convert them to PropertyChange events.
+ */
protected ComponentListener accessibleAWTComponentHandler = null;
+
+ /**
+ * A listener to track focus events
+ * and convert them to PropertyChange events.
+ */
protected FocusListener accessibleAWTFocusHandler = null;
/**
--- a/jdk/src/share/classes/java/awt/ComponentOrientation.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/ComponentOrientation.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -126,6 +126,8 @@
* Are lines horizontal?
* This will return true for horizontal, left-to-right writing
* systems such as Roman.
+ *
+ * @return {@code true} if this orientation has horizontal lines
*/
public boolean isHorizontal() {
return (orientation & HORIZ_BIT) != 0;
@@ -136,6 +138,8 @@
* Vertical Lines: Do lines run left-to-right?<br>
* This will return true for horizontal, left-to-right writing
* systems such as Roman.
+ *
+ * @return {@code true} if this orientation is left-to-right
*/
public boolean isLeftToRight() {
return (orientation & LTR_BIT) != 0;
@@ -143,7 +147,9 @@
/**
* Returns the orientation that is appropriate for the given locale.
+ *
* @param locale the specified locale
+ * @return the orientation for the locale
*/
public static ComponentOrientation getOrientation(Locale locale) {
// A more flexible implementation would consult a ResourceBundle
@@ -171,6 +177,8 @@
* <li>Return the default locale's orientation.
* </ol>
*
+ * @param bdl the bundle to use
+ * @return the orientation
* @deprecated As of J2SE 1.4, use {@link #getOrientation(java.util.Locale)}.
*/
@Deprecated
--- a/jdk/src/share/classes/java/awt/Container.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Container.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -310,6 +310,9 @@
}
/**
+ * Returns the number of components in this container.
+ *
+ * @return the number of components in this container
* @deprecated As of JDK version 1.1,
* replaced by getComponentCount().
*/
@@ -391,8 +394,11 @@
}
/**
+ * Returns the insets for this container.
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>getInsets()</code>.
+ * @return the insets for this container
*/
@Deprecated
public Insets insets() {
@@ -438,6 +444,9 @@
* displayed, the hierarchy must be validated thereafter in order to
* display the added component.
*
+ * @param name the name of the component to be added
+ * @param comp the component to be added
+ * @return the component added
* @exception NullPointerException if {@code comp} is {@code null}
* @see #add(Component, Object)
* @see #invalidate
@@ -1471,8 +1480,10 @@
/**
* Gets the layout manager for this container.
+ *
* @see #doLayout
* @see #setLayout
+ * @return the current layout manager for this container
*/
public LayoutManager getLayout() {
return layoutMgr;
@@ -3854,6 +3865,10 @@
*/
private volatile transient int propertyListenersCount = 0;
+ /**
+ * The handler to fire {@code PropertyChange}
+ * when children are added or removed
+ */
protected ContainerListener accessibleContainerHandler = null;
/**
--- a/jdk/src/share/classes/java/awt/Cursor.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Cursor.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -294,6 +294,7 @@
* @return the system specific custom cursor named
* @exception HeadlessException if
* <code>GraphicsEnvironment.isHeadless</code> returns true
+ * @exception AWTException in case of erroneous retrieving of the cursor
*/
static public Cursor getSystemCustomCursor(final String name)
throws AWTException, HeadlessException {
@@ -378,6 +379,8 @@
/**
* Return the system default cursor.
+ *
+ * @return the default cursor
*/
static public Cursor getDefaultCursor() {
return getPredefinedCursor(Cursor.DEFAULT_CURSOR);
@@ -416,6 +419,8 @@
/**
* Returns the type for this cursor.
+ *
+ * @return the cursor type
*/
public int getType() {
return type;
--- a/jdk/src/share/classes/java/awt/DisplayMode.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/DisplayMode.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -125,6 +125,8 @@
/**
* Returns whether the two display modes are equal.
+ *
+ * @param dm the display mode to compare to
* @return whether the two display modes are equal
*/
public boolean equals(DisplayMode dm) {
--- a/jdk/src/share/classes/java/awt/EventQueue.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/EventQueue.java Tue Jun 24 16:57:02 2014 +0400
@@ -222,6 +222,9 @@
});
}
+ /**
+ * Initializes a new instance of {@code EventQueue}.
+ */
public EventQueue() {
for (int i = 0; i < NUM_PRIORITIES; i++) {
queues[i] = new Queue();
--- a/jdk/src/share/classes/java/awt/Frame.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Frame.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -1089,6 +1089,9 @@
}
/**
+ * Sets the cursor for this frame to the specified type.
+ *
+ * @param cursorType the cursor type
* @deprecated As of JDK version 1.1,
* replaced by <code>Component.setCursor(Cursor)</code>.
*/
@@ -1103,6 +1106,7 @@
/**
* @deprecated As of JDK version 1.1,
* replaced by <code>Component.getCursor()</code>.
+ * @return the cursor type for this frame
*/
@Deprecated
public int getCursorType() {
@@ -1124,6 +1128,8 @@
* ownerless {@code Dialog}s (introduced in release 1.6), use {@link
* Window#getOwnerlessWindows Window.getOwnerlessWindows}.
*
+ * @return the array of all {@code Frame}s created by this application
+ *
* @see Window#getWindows()
* @see Window#getOwnerlessWindows
*
--- a/jdk/src/share/classes/java/awt/GraphicsEnvironment.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/GraphicsEnvironment.java Tue Jun 24 16:57:02 2014 +0400
@@ -357,6 +357,8 @@
* <p>Notice that an application can supersede the registration
* of an earlier created font with a new one.
* </ul>
+ *
+ * @param font the font to be registered
* @return true if the <code>font</code> is successfully
* registered in this <code>GraphicsEnvironment</code>.
* @throws NullPointerException if <code>font</code> is null
--- a/jdk/src/share/classes/java/awt/GridBagLayout.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/GridBagLayout.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -981,9 +981,15 @@
* This method is obsolete and supplied for backwards
* compatibility only; new code should call {@link
* #getLayoutInfo(java.awt.Container, int) getLayoutInfo} instead.
- * This method is the same as <code>getLayoutInfo</code>;
- * refer to <code>getLayoutInfo</code> for details on parameters
- * and return value.
+ *
+ * Fills in an instance of {@code GridBagLayoutInfo} for the
+ * current set of managed children. This method is the same
+ * as {@code getLayoutInfo}; refer to {@code getLayoutInfo}
+ * description for details.
+ *
+ * @param parent the layout container
+ * @param sizeflag either {@code PREFERREDSIZE} or {@code MINSIZE}
+ * @return the {@code GridBagLayoutInfo} for the set of children
*/
protected GridBagLayoutInfo GetLayoutInfo(Container parent, int sizeflag) {
synchronized (parent.getTreeLock()) {
@@ -1611,13 +1617,17 @@
}
/**
+ * Adjusts the x, y, width, and height fields to the correct
+ * values depending on the constraint geometry and pads.
+ * <p>
* This method is obsolete and supplied for backwards
* compatibility only; new code should call {@link
* #adjustForGravity(java.awt.GridBagConstraints, java.awt.Rectangle)
* adjustForGravity} instead.
- * This method is the same as <code>adjustForGravity</code>;
- * refer to <code>adjustForGravity</code> for details
- * on parameters.
+ * This method is the same as <code>adjustForGravity</code>
+ *
+ * @param constraints the constraints to be applied
+ * @param r the {@code Rectangle} to be adjusted
*/
protected void AdjustForGravity(GridBagConstraints constraints,
Rectangle r) {
@@ -1995,9 +2005,12 @@
* This method is obsolete and supplied for backwards
* compatibility only; new code should call {@link
* #getMinSize(java.awt.Container, GridBagLayoutInfo) getMinSize} instead.
- * This method is the same as <code>getMinSize</code>;
- * refer to <code>getMinSize</code> for details on parameters
- * and return value.
+ * This method is the same as <code>getMinSize</code>
+ *
+ * @param parent the layout container
+ * @param info the layout info for this parent
+ * @return a <code>Dimension</code> object containing the
+ * minimum size
*/
protected Dimension GetMinSize(Container parent, GridBagLayoutInfo info) {
Dimension d = new Dimension();
@@ -2035,9 +2048,9 @@
* This method is obsolete and supplied for backwards
* compatibility only; new code should call {@link
* #arrangeGrid(Container) arrangeGrid} instead.
- * This method is the same as <code>arrangeGrid</code>;
- * refer to <code>arrangeGrid</code> for details on the
- * parameter.
+ * This method is the same as <code>arrangeGrid</code>
+ *
+ * @param parent the layout container
*/
protected void ArrangeGrid(Container parent) {
Component comp;
--- a/jdk/src/share/classes/java/awt/HeadlessException.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/HeadlessException.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -38,10 +38,24 @@
* JDK 1.4 serialVersionUID
*/
private static final long serialVersionUID = 167183644944358563L;
+
+ /**
+ * Constructs new {@code HeadlessException}
+ */
public HeadlessException() {}
+
+ /**
+ * Create a new instance with the specified detailed error message.
+ *
+ * @param msg the error message
+ */
public HeadlessException(String msg) {
super(msg);
}
+
+ /**
+ * {@inheritDoc}
+ */
public String getMessage() {
String superMessage = super.getMessage();
String headlessMessage = GraphicsEnvironment.getHeadlessMessage();
--- a/jdk/src/share/classes/java/awt/ItemSelectable.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/ItemSelectable.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -39,6 +39,8 @@
/**
* Returns the selected items or <code>null</code> if no
* items are selected.
+ *
+ * @return the list of selected objects, or {@code null}
*/
public Object[] getSelectedObjects();
--- a/jdk/src/share/classes/java/awt/KeyboardFocusManager.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java Tue Jun 24 16:57:02 2014 +0400
@@ -1459,6 +1459,7 @@
* Returns an array of all the <code>PropertyChangeListener</code>s
* associated with the named property.
*
+ * @param propertyName the property name
* @return all of the <code>PropertyChangeListener</code>s associated with
* the named property or an empty array if no such listeners have
* been added.
@@ -1628,6 +1629,7 @@
* Returns an array of all the <code>VetoableChangeListener</code>s
* associated with the named property.
*
+ * @param propertyName the property name
* @return all of the <code>VetoableChangeListener</code>s associated with
* the named property or an empty array if no such listeners have
* been added.
--- a/jdk/src/share/classes/java/awt/Label.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Label.java Tue Jun 24 16:57:02 2014 +0400
@@ -193,7 +193,8 @@
* Gets the current alignment of this label. Possible values are
* <code>Label.LEFT</code>, <code>Label.RIGHT</code>, and
* <code>Label.CENTER</code>.
- * @see java.awt.Label#setAlignment
+ * @return the alignment of this label
+ * @see java.awt.Label#setAlignment
*/
public int getAlignment() {
return alignment;
@@ -321,6 +322,9 @@
*/
private static final long serialVersionUID = -3568967560160480438L;
+ /**
+ * Constructor for the accessible label.
+ */
public AccessibleAWTLabel() {
super();
}
--- a/jdk/src/share/classes/java/awt/LayoutManager.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/LayoutManager.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -61,7 +61,9 @@
/**
* Calculates the preferred size dimensions for the specified
* container, given the components it contains.
- * @param parent the container to be laid out
+ *
+ * @param parent the container to be laid out
+ * @return the preferred dimension for the container
*
* @see #minimumLayoutSize
*/
@@ -70,7 +72,10 @@
/**
* Calculates the minimum size dimensions for the specified
* container, given the components it contains.
- * @param parent the component to be laid out
+ *
+ * @param parent the component to be laid out
+ * @return the minimum dimension for the container
+ *
* @see #preferredLayoutSize
*/
Dimension minimumLayoutSize(Container parent);
--- a/jdk/src/share/classes/java/awt/LayoutManager2.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/LayoutManager2.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -55,8 +55,11 @@
/**
* Calculates the maximum size dimensions for the specified container,
* given the components it contains.
+ *
* @see java.awt.Component#getMaximumSize
* @see LayoutManager
+ * @param target the target container
+ * @return the maximum size of the container
*/
public Dimension maximumLayoutSize(Container target);
@@ -66,6 +69,9 @@
* components. The value should be a number between 0 and 1
* where 0 represents alignment along the origin, 1 is aligned
* the furthest away from the origin, 0.5 is centered, etc.
+ *
+ * @param target the target container
+ * @return the x-axis alignment preference
*/
public float getLayoutAlignmentX(Container target);
@@ -75,12 +81,16 @@
* components. The value should be a number between 0 and 1
* where 0 represents alignment along the origin, 1 is aligned
* the furthest away from the origin, 0.5 is centered, etc.
+ *
+ * @param target the target container
+ * @return the y-axis alignment preference
*/
public float getLayoutAlignmentY(Container target);
/**
* Invalidates the layout, indicating that if the layout manager
* has cached information it should be discarded.
+ * @param target the target container
*/
public void invalidateLayout(Container target);
--- a/jdk/src/share/classes/java/awt/List.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/List.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -282,6 +282,9 @@
}
/**
+ * Returns the number of items in the list.
+ *
+ * @return the number of items in the list
* @deprecated As of JDK version 1.1,
* replaced by <code>getItemCount()</code>.
*/
@@ -333,7 +336,10 @@
}
/**
- * @deprecated replaced by <code>add(String)</code>.
+ * Adds the specified item to the end of the list.
+ *
+ * @param item the item to be added
+ * @deprecated replaced by <code>add(String)</code>.
*/
@Deprecated
public void addItem(String item) {
@@ -358,7 +364,12 @@
}
/**
- * @deprecated replaced by <code>add(String, int)</code>.
+ * Adds the specified item to the the list
+ * at the position indicated by the index.
+ *
+ * @param item the item to be added
+ * @param index the position at which to add the item
+ * @deprecated replaced by <code>add(String, int)</code>.
*/
@Deprecated
public synchronized void addItem(String item, int index) {
@@ -455,8 +466,11 @@
}
/**
- * @deprecated replaced by <code>remove(String)</code>
- * and <code>remove(int)</code>.
+ * Removes the item at the specified position.
+ *
+ * @param position the index of the item to delete
+ * @deprecated replaced by <code>remove(String)</code>
+ * and <code>remove(int)</code>.
*/
@Deprecated
public void delItem(int position) {
@@ -646,6 +660,10 @@
}
/**
+ * Determines if the specified item in the list is selected.
+ *
+ * @param index specifies the item to be checked
+ * @return {@code true} if the item is selected; otherwise {@code false}
* @deprecated As of JDK version 1.1,
* replaced by <code>isIndexSelected(int)</code>.
*/
@@ -672,6 +690,7 @@
/**
* Determines whether this list allows multiple selections.
+ *
* @return <code>true</code> if this list allows multiple
* selections; otherwise, <code>false</code>
* @see #setMultipleMode
@@ -682,6 +701,10 @@
}
/**
+ * Determines whether this list allows multiple selections.
+ *
+ * @return {@code true} if this list allows multiple
+ * selections; otherwise {@code false}
* @deprecated As of JDK version 1.1,
* replaced by <code>isMultipleMode()</code>.
*/
@@ -709,6 +732,9 @@
}
/**
+ * Enables or disables multiple selection mode for this list.
+ *
+ * @param b {@code true} to enable multiple mode, {@code false} otherwise
* @deprecated As of JDK version 1.1,
* replaced by <code>setMultipleMode(boolean)</code>.
*/
@@ -760,6 +786,11 @@
}
/**
+ * Returns the preferred size of this component
+ * assuming it has the specified number of rows.
+ *
+ * @param rows the number of rows
+ * @return the preferred dimensions for displaying this list
* @deprecated As of JDK version 1.1,
* replaced by <code>getPreferredSize(int)</code>.
*/
@@ -810,6 +841,11 @@
}
/**
+ * Returns the minimum dimensions for the list
+ * with the specified number of rows.
+ *
+ * @param rows the number of rows in the list
+ * @return the minimum dimensions for displaying this list
* @deprecated As of JDK version 1.1,
* replaced by <code>getMinimumSize(int)</code>.
*/
@@ -1146,6 +1182,10 @@
}
/**
+ * Deletes the list items in the specified index range.
+ *
+ * @param start the beginning index of the range to delete
+ * @param end the ending index of the range to delete
* @deprecated As of JDK version 1.1,
* Not for public use in the future.
* This method is expected to be retained only as a package
@@ -1290,6 +1330,9 @@
*/
private static final long serialVersionUID = 7924617370136012829L;
+ /**
+ * Constructs new {@code AccessibleAWTList}
+ */
public AccessibleAWTList() {
super();
List.this.addActionListener(this);
@@ -1491,6 +1534,13 @@
private List parent;
private int indexInParent;
+ /**
+ * Constructs new {@code AccessibleAWTListChild} with the given
+ * parent {@code List} and 0-based index of this object in the parent.
+ *
+ * @param parent the parent {@code List}
+ * @param indexInParent the index in the parent
+ */
public AccessibleAWTListChild(List parent, int indexInParent) {
this.parent = parent;
this.setAccessibleParent(parent);
--- a/jdk/src/share/classes/java/awt/MediaTracker.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/MediaTracker.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -643,9 +643,11 @@
* image is considered to have finished loading. Use the
* <code>statusID</code>, <code>isErrorID</code>, and
* <code>isErrorAny</code> methods to check for errors.
- * @param id the identifier of the images to check
- * @param ms the length of time, in milliseconds, to wait
- * for the loading to complete
+ * @param id the identifier of the images to check
+ * @param ms the length of time, in milliseconds, to wait
+ * for the loading to complete
+ * @return {@code true} if the loading completed in time;
+ * otherwise {@code false}
* @see java.awt.MediaTracker#waitForAll
* @see java.awt.MediaTracker#waitForID(int)
* @see java.awt.MediaTracker#statusID
--- a/jdk/src/share/classes/java/awt/Menu.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Menu.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -213,7 +213,7 @@
/**
* Get the number of items in this menu.
- * @return the number of items in this menu.
+ * @return the number of items in this menu
* @since 1.1
*/
public int getItemCount() {
@@ -221,6 +221,9 @@
}
/**
+ * Returns the number of items in this menu.
+ *
+ * @return the number of items in this menu
* @deprecated As of JDK version 1.1,
* replaced by <code>getItemCount()</code>.
*/
--- a/jdk/src/share/classes/java/awt/MenuBar.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/MenuBar.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -279,6 +279,9 @@
}
/**
+ * Gets the number of menus on the menu bar.
+ *
+ * @return the number of menus on the menu bar.
* @deprecated As of JDK version 1.1,
* replaced by <code>getMenuCount()</code>.
*/
@@ -338,10 +341,11 @@
* or <code>null</code> if none of the menu items being managed
* by this menu bar is associated with the specified menu
* shortcut.
- * @param s the specified menu shortcut.
- * @see java.awt.MenuItem
- * @see java.awt.MenuShortcut
- * @since 1.1
+ * @param s the specified menu shortcut.
+ * @return the menu item for the specified shortcut.
+ * @see java.awt.MenuItem
+ * @see java.awt.MenuShortcut
+ * @since 1.1
*/
public MenuItem getShortcutMenuItem(MenuShortcut s) {
int nmenus = getMenuCount();
--- a/jdk/src/share/classes/java/awt/MenuComponent.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/MenuComponent.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -220,6 +220,7 @@
/**
* @deprecated As of JDK version 1.1,
* programs should not directly manipulate peers.
+ * @return the peer for this component
*/
@Deprecated
public MenuComponentPeer getPeer() {
--- a/jdk/src/share/classes/java/awt/MenuContainer.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/MenuContainer.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -31,10 +31,25 @@
*/
public interface MenuContainer {
+
+ /**
+ * Returns the font in use by this container.
+ *
+ * @return the menu font
+ */
Font getFont();
+
+ /**
+ * Removes the specified menu component from the menu.
+ *
+ * @param comp the menu component to remove
+ */
void remove(MenuComponent comp);
/**
+ * Posts an event to the listeners.
+ *
+ * @param evt the event to dispatch
* @deprecated As of JDK version 1.1
* replaced by dispatchEvent(AWTEvent).
*/
--- a/jdk/src/share/classes/java/awt/MenuItem.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/MenuItem.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -264,6 +264,9 @@
/**
* Checks whether this menu item is enabled.
+ *
+ * @return {@code true} if the item is enabled;
+ * otherwise {@code false}
* @see java.awt.MenuItem#setEnabled
* @since 1.0
*/
@@ -296,6 +299,10 @@
}
/**
+ * Sets whether or not this menu item can be chosen.
+ *
+ * @param b if {@code true}, enables this menu item;
+ * otherwise disables
* @deprecated As of JDK version 1.1,
* replaced by <code>setEnabled(boolean)</code>.
*/
@@ -494,8 +501,10 @@
/**
* Gets the command name of the action event that is fired
* by this menu item.
- * @see java.awt.MenuItem#setActionCommand
- * @since 1.1
+ *
+ * @return the action command name
+ * @see java.awt.MenuItem#setActionCommand
+ * @since 1.1
*/
public String getActionCommand() {
return getActionCommandImpl();
--- a/jdk/src/share/classes/java/awt/PrintGraphics.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/PrintGraphics.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1997, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -35,6 +35,8 @@
/**
* Returns the PrintJob object from which this PrintGraphics
* object originated.
+ *
+ * @return the print job for this object
*/
public PrintJob getPrintJob();
--- a/jdk/src/share/classes/java/awt/PrintJob.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/PrintJob.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -42,6 +42,7 @@
* object is disposed. This graphics object will also implement
* the PrintGraphics interface.
* @see PrintGraphics
+ * @return the graphics context for printing the next page
*/
public abstract Graphics getGraphics();
@@ -49,6 +50,8 @@
* Returns the dimensions of the page in pixels.
* The resolution of the page is chosen so that it
* is similar to the screen resolution.
+ *
+ * @return the page dimension
*/
public abstract Dimension getPageDimension();
@@ -56,11 +59,16 @@
* Returns the resolution of the page in pixels per inch.
* Note that this doesn't have to correspond to the physical
* resolution of the printer.
+ *
+ * @return the page resolution
*/
public abstract int getPageResolution();
/**
* Returns true if the last page will be printed first.
+ *
+ * @return {@code true} if the last page will be printed first;
+ * otherwise {@code false}
*/
public abstract boolean lastPageFirst();
--- a/jdk/src/share/classes/java/awt/Robot.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Robot.java Tue Jun 24 16:57:02 2014 +0400
@@ -498,6 +498,8 @@
/**
* Returns the number of milliseconds this Robot sleeps after generating an event.
+ *
+ * @return the delay duration in milliseconds
*/
public synchronized int getAutoDelay() {
return autoDelay;
@@ -505,7 +507,10 @@
/**
* Sets the number of milliseconds this Robot sleeps after generating an event.
- * @throws IllegalArgumentException If <code>ms</code> is not between 0 and 60,000 milliseconds inclusive
+ *
+ * @param ms the delay duration in milliseconds
+ * @throws IllegalArgumentException If {@code ms}
+ * is not between 0 and 60,000 milliseconds inclusive
*/
public synchronized void setAutoDelay(int ms) {
checkDelayArgument(ms);
@@ -523,9 +528,11 @@
* Sleeps for the specified time.
* To catch any <code>InterruptedException</code>s that occur,
* <code>Thread.sleep()</code> may be used instead.
- * @param ms time to sleep in milliseconds
- * @throws IllegalArgumentException if <code>ms</code> is not between 0 and 60,000 milliseconds inclusive
- * @see java.lang.Thread#sleep
+ *
+ * @param ms time to sleep in milliseconds
+ * @throws IllegalArgumentException if {@code ms}
+ * is not between 0 and 60,000 milliseconds inclusive
+ * @see java.lang.Thread#sleep
*/
public synchronized void delay(int ms) {
checkDelayArgument(ms);
--- a/jdk/src/share/classes/java/awt/ScrollPane.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/ScrollPane.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -323,7 +323,9 @@
* represents the state of the vertical scrollbar.
* The declared return type of this method is
* <code>Adjustable</code> to maintain backward compatibility.
+ *
* @see java.awt.ScrollPaneAdjustable
+ * @return the vertical scrollbar state
*/
public Adjustable getVAdjustable() {
return vAdjustable;
@@ -334,7 +336,9 @@
* represents the state of the horizontal scrollbar.
* The declared return type of this method is
* <code>Adjustable</code> to maintain backward compatibility.
+ *
* @see java.awt.ScrollPaneAdjustable
+ * @return the horizontal scrollbar state
*/
public Adjustable getHAdjustable() {
return hAdjustable;
@@ -657,6 +661,9 @@
* Indicates whether or not scrolling will take place in response to
* the mouse wheel. Wheel scrolling is enabled by default.
*
+ * @return {@code true} if the wheel scrolling enabled;
+ * otherwise {@code false}
+ *
* @see #setWheelScrollingEnabled(boolean)
* @since 1.4
*/
--- a/jdk/src/share/classes/java/awt/Scrollbar.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Scrollbar.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -656,6 +656,9 @@
}
/**
+ * Returns the visible amount of this scroll bar.
+ *
+ * @return the visible amount of this scroll bar
* @deprecated As of JDK version 1.1,
* replaced by <code>getVisibleAmount()</code>.
*/
@@ -729,6 +732,10 @@
}
/**
+ * Sets the unit increment for this scroll bar.
+ *
+ * @param v the increment value
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>setUnitIncrement(int)</code>.
*/
@@ -768,6 +775,9 @@
}
/**
+ * Returns the unit increment for this scrollbar.
+ *
+ * @return the unit increment for this scrollbar
* @deprecated As of JDK version 1.1,
* replaced by <code>getUnitIncrement()</code>.
*/
@@ -797,6 +807,9 @@
}
/**
+ * Sets the block increment for this scroll bar.
+ *
+ * @param v the block increment
* @deprecated As of JDK version 1.1,
* replaced by <code>setBlockIncrement()</code>.
*/
@@ -833,6 +846,10 @@
}
/**
+ * Returns the block increment of this scroll bar.
+ *
+ * @return the block increment of this scroll bar
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>getBlockIncrement()</code>.
*/
--- a/jdk/src/share/classes/java/awt/TextArea.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/TextArea.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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,6 +314,11 @@
}
/**
+ * Inserts the specified text at the specified position
+ * in this text area.
+ *
+ * @param str the non-{@code null} text to insert
+ * @param pos the position at which to insert
* @deprecated As of JDK version 1.1,
* replaced by <code>insert(String, int)</code>.
*/
@@ -342,6 +347,9 @@
}
/**
+ * Appends the given text to the text area's current text.
+ *
+ * @param str the text to append
* @deprecated As of JDK version 1.1,
* replaced by <code>append(String)</code>.
*/
@@ -378,6 +386,15 @@
}
/**
+ * Replaces a range of characters between
+ * the indicated start and end positions
+ * with the specified replacement text (the text at the end
+ * position will not be replaced).
+ *
+ * @param str the non-{@code null} text to use as
+ * the replacement
+ * @param start the start position
+ * @param end the end position
* @deprecated As of JDK version 1.1,
* replaced by <code>replaceRange(String, int, int)</code>.
*/
@@ -492,6 +509,12 @@
}
/**
+ * Determines the preferred size of the text area with the specified
+ * number of rows and columns.
+ *
+ * @param rows the number of rows
+ * @param columns the number of columns
+ * @return the preferred dimensions needed for the text area
* @deprecated As of JDK version 1.1,
* replaced by <code>getPreferredSize(int, int)</code>.
*/
@@ -544,6 +567,12 @@
}
/**
+ * Determines the minimum size of the text area with the specified
+ * number of rows and columns.
+ *
+ * @param rows the number of rows
+ * @param columns the number of columns
+ * @return the minimum size for the text area
* @deprecated As of JDK version 1.1,
* replaced by <code>getMinimumSize(int, int)</code>.
*/
--- a/jdk/src/share/classes/java/awt/TextComponent.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/TextComponent.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -107,6 +107,9 @@
// the background color of non-editable TextComponents.
boolean backgroundSetByClientCode = false;
+ /**
+ * A list of listeners that will receive events from this object.
+ */
transient protected TextListener textListener;
/*
--- a/jdk/src/share/classes/java/awt/TextField.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/TextField.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -272,6 +272,10 @@
}
/**
+ * Sets the character to be echoed when protected input is displayed.
+ *
+ * @param c the echo character for this text field
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>setEchoChar(char)</code>.
*/
@@ -368,6 +372,12 @@
}
/**
+ * Returns the preferred size for this text field
+ * with the specified number of columns.
+ *
+ * @param columns the number of columns
+ * @return the preferred size for the text field
+ *
* @deprecated As of JDK version 1.1,
* replaced by <code>getPreferredSize(int)</code>.
*/
@@ -407,8 +417,9 @@
/**
* Gets the minimum dimensions for a text field with
* the specified number of columns.
- * @param columns the number of columns in
- * this text field.
+ * @param columns the number of columns in
+ * this text field.
+ * @return the minimum size for this text field
* @since 1.1
*/
public Dimension getMinimumSize(int columns) {
@@ -416,6 +427,11 @@
}
/**
+ * Returns the minimum dimensions for a text field with
+ * the specified number of columns.
+ *
+ * @param columns the number of columns
+ * @return the minimum size for this text field
* @deprecated As of JDK version 1.1,
* replaced by <code>getMinimumSize(int)</code>.
*/
--- a/jdk/src/share/classes/java/awt/Toolkit.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Toolkit.java Tue Jun 24 16:57:02 2014 +0400
@@ -422,7 +422,8 @@
* and allows the Component and Container classes to be extended directly
* to create windowless components that are defined entirely in java.
*
- * @param target The Component to be created.
+ * @param target The Component to be created.
+ * @return the peer for the specified component
*/
protected LightweightPeer createComponent(Component target) {
if (lightweightMarker == null) {
@@ -1370,6 +1371,9 @@
* {@link java.awt.event.KeyEvent#VK_SCROLL_LOCK VK_SCROLL_LOCK}, and
* {@link java.awt.event.KeyEvent#VK_KANA_LOCK VK_KANA_LOCK}.
*
+ * @param keyCode the key code
+ * @return {@code true} if the given key is currently in its "on" state;
+ * otherwise {@code false}
* @exception java.lang.IllegalArgumentException if <code>keyCode</code>
* is not one of the valid key codes
* @exception java.lang.UnsupportedOperationException if the host system doesn't
@@ -1404,6 +1408,8 @@
* involve event processing and therefore may not be immediately
* observable through getLockingKeyState.
*
+ * @param keyCode the key code
+ * @param on the state of the key
* @exception java.lang.IllegalArgumentException if <code>keyCode</code>
* is not one of the valid key codes
* @exception java.lang.UnsupportedOperationException if the host system doesn't
@@ -1429,6 +1435,9 @@
/**
* Give native peers the ability to query the native container
* given a native component (eg the direct parent may be lightweight).
+ *
+ * @param c the component to fetch the container for
+ * @return the native container object for the component
*/
protected static Container getNativeContainer(Component c) {
return c.getNativeContainer();
@@ -1449,6 +1458,7 @@
* @param name a localized description of the cursor, for Java Accessibility use
* @exception IndexOutOfBoundsException if the hotSpot values are outside
* the bounds of the cursor
+ * @return the cursor created
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
@@ -1675,6 +1685,11 @@
/**
* Gets a property with the specified key and default.
* This method returns defaultValue if the property is not found.
+ *
+ * @param key the key
+ * @param defaultValue the default value
+ * @return the value of the property or the default value
+ * if the property was not found
*/
public static String getProperty(String key, String defaultValue) {
// first try platform specific bundle
@@ -1738,6 +1753,9 @@
* Creates the peer for a DragSourceContext.
* Always throws InvalidDndOperationException if
* GraphicsEnvironment.isHeadless() returns true.
+ *
+ * @param dge the {@code DragGestureEvent}
+ * @return the peer created
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public abstract DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException;
@@ -1775,6 +1793,9 @@
* representation for an underlying platform dependent desktop setting.
* For more information on desktop properties supported by the AWT see
* <a href="doc-files/DesktopProperties.html">AWT Desktop Properties</a>.
+ *
+ * @param propertyName the property name
+ * @return the value for the specified desktop property
*/
public final synchronized Object getDesktopProperty(String propertyName) {
// This is a workaround for headless toolkits. It would be
@@ -1818,6 +1839,9 @@
/**
* Sets the named desktop property to the specified value and fires a
* property change event to notify any listeners that the value has changed.
+ *
+ * @param name the property name
+ * @param newValue the new property value
*/
protected final void setDesktopProperty(String name, Object newValue) {
// This is a workaround for headless toolkits. It would be
--- a/jdk/src/share/classes/java/awt/Window.java Tue Jun 24 10:25:56 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Window.java Tue Jun 24 16:57:02 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -1452,6 +1452,8 @@
/**
* Returns the owner of this window.
+ *
+ * @return the owner of this window
* @since 1.2
*/
public Window getOwner() {
@@ -1464,6 +1466,8 @@
/**
* Return an array containing all the windows this
* window currently owns.
+ *
+ * @return the array of all the owned windows
* @since 1.2
*/
public Window[] getOwnedWindows() {
@@ -1586,6 +1590,7 @@
* dialogs such as component positions, {@code LayoutManager}s
* or serialization.
*
+ * @return the array of all the {@code Window}s created by the application
* @see Frame#getFrames
* @see Window#getOwnerlessWindows
*
@@ -1608,6 +1613,8 @@
* dialogs such as component positions, {@code LayoutManager}s
* or serialization.
*
+ * @return the array of all the ownerless {@code Window}s
+ * created by this application
* @see Frame#getFrames
* @see Window#getWindows()
*
@@ -2849,6 +2856,7 @@
*
* This method can only be called while the window is not displayable.
*
+ * @param type the window type
* @throws IllegalComponentStateException if the window
* is displayable.
* @throws IllegalArgumentException if the type is {@code null}
@@ -2874,6 +2882,7 @@
/**
* Returns the type of the window.
*
+ * @return the type of the window
* @see #setType
* @since 1.7
*/