--- old/src/share/classes/java/awt/Component.java 2014-06-23 19:31:44.000000000 +0400
+++ new/src/share/classes/java/awt/Component.java 2014-06-23 19:31:44.000000000 +0400
@@ -1075,6 +1075,7 @@
* @deprecated As of JDK version 1.1,
* programs should not directly manipulate peers;
* replaced by boolean isDisplayable()
.
+ * @return the peer for this component
*/
@Deprecated
public ComponentPeer getPeer() {
@@ -1132,6 +1133,8 @@
/**
* Gets the DropTarget
associated with this
* Component
.
+ *
+ * @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 setEnabled(boolean)
.
*/
@@ -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 setVisible(boolean)
.
*/
@@ -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 getLocation()
.
*/
@@ -2102,6 +2118,13 @@
}
/**
+ * Moves this component to a new location.
+ *
+ * @param x the x-coordinate of the new location's
+ * top-left corner in the parent's coordinate space
+ * @param y the y-coordinate of the new location's
+ * top-left corner in the parent's coordinate space
+ *
* @deprecated As of JDK version 1.1,
* replaced by setLocation(int, int)
.
*/
@@ -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 getSize()
.
*/
@@ -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 setSize(int, int)
.
*/
@@ -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 setSize(Dimension)
.
*/
@@ -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 getBounds()
.
*/
@@ -2265,6 +2304,13 @@
}
/**
+ * Reshapes the bounding rectangle for this component.
+ *
+ * @param x the x coordinate of the upper left corner of the rectangle
+ * @param y the y 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 setBounds(int, int, int, int)
.
*/
@@ -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 getPreferredSize()
.
*/
@@ -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 getMinimumSize()
.
*/
@@ -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,6 +3213,8 @@
* not have a cursor set, the cursor of its parent is returned.
* If no cursor is set in the entire hierarchy,
* Cursor.DEFAULT_CURSOR
is returned.
+ *
+ * @return the cursor for this component
* @see #setCursor
* @since JDK1.1
*/
@@ -4260,10 +4318,15 @@
* a lost state.
*/
protected boolean validatedContents; // = false
+
/**
- * Size of the back buffers
+ * The width of the back buffers
*/
protected int width;
+
+ /**
+ * The height of the back buffers
+ */
protected int height;
/**
@@ -4304,6 +4367,8 @@
/**
* Creates the back buffers
+ *
+ * @param numBuffers the number of buffers to create
*/
protected void createBackBuffers(int numBuffers) {
if (numBuffers == 0) {
@@ -4593,6 +4658,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,16 +4687,25 @@
* Checks whether this component "contains" the specified point,
* where x
and y
are defined to be
* relative to the coordinate system of this component.
- * @param x the x coordinate of the point
- * @param y the y coordinate of the point
- * @see #getComponentAt(int, int)
- * @since JDK1.1
+ *
+ * @param x the x coordinate of the point
+ * @param y the y coordinate of the point
+ * @return {@code true} if the point is within the component;
+ * otherwise {@code false}
+ * @see #getComponentAt(int, int)
+ * @since JDK1.1
*/
public boolean contains(int x, int y) {
return inside(x, y);
}
/**
+ * Checks whether the point is inside of this component.
+ *
+ * @param x the x coordinate of the point
+ * @param y the y 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,10 +4718,13 @@
* Checks whether this component "contains" the specified point,
* where the point's x and y coordinates are defined
* to be relative to the coordinate system of this component.
- * @param p the point
- * @throws NullPointerException if {@code p} is {@code null}
- * @see #getComponentAt(Point)
- * @since JDK1.1
+ *
+ * @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 JDK1.1
*/
public boolean contains(Point p) {
return contains(p.x, p.y);
@@ -4676,6 +4756,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 x coordinate to search for components at
+ * @param y the y 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 +4774,17 @@
/**
* Returns the component or subcomponent that contains the
* specified point.
- * @param p the point
- * @see java.awt.Component#contains
- * @since JDK1.1
+ * @param p the point
+ * @return the component at the specified location or {@code null}
+ * @see java.awt.Component#contains
+ * @since JDK1.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 dispatchEvent(AWTEvent e)
.
*/
@@ -6746,6 +6835,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 +6880,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 +6893,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 +6906,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 +6919,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 +6932,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 +6945,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 +6958,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 +6970,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 +6982,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 +7194,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 +7206,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 +8520,8 @@
* Returns an array of all the listeners which have been associated
* with the named property.
*
+ * @param propertyName the property name
+ *
* @return all of the PropertyChangeListener
s associated with
* the named property; if no such listeners have been added or
* if propertyName
is null
, an empty
@@ -8400,8 +8532,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 +9010,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 +9038,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 +9196,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;
/**