提交 a9f79f9a 编写于 作者: Y yan

8025218: [javadoc] some errors in java/awt classes

Reviewed-by: yan
Contributed-by: NDmitry Zinkevich <dmitry.zinkevich@oracle.com>
上级 8a881bc7
......@@ -485,11 +485,11 @@ public class AWTKeyStroke implements Serializable {
* If typed, pressed or released is not specified, pressed is assumed. Here
* are some examples:
* <pre>
* "INSERT" => getAWTKeyStroke(KeyEvent.VK_INSERT, 0);
* "control DELETE" => getAWTKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
* "alt shift X" => getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
* "alt shift released X" => getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
* "typed a" => getAWTKeyStroke('a');
* "INSERT" =&gt; getAWTKeyStroke(KeyEvent.VK_INSERT, 0);
* "control DELETE" =&gt; getAWTKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
* "alt shift X" =&gt; getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
* "alt shift released X" =&gt; getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
* "typed a" =&gt; getAWTKeyStroke('a');
* </pre>
*
* @param s a String formatted as described above
......
......@@ -2026,7 +2026,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return an instance of <code>Point</code> representing
* the top-left corner of the component's bounds in the
* coordinate space of the screen
* @throws <code>IllegalComponentStateException</code> if the
* @throws IllegalComponentStateException if the
* component is not showing on the screen
* @see #setLocation
* @see #getLocation
......
......@@ -1246,7 +1246,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
* any) should be cancelled.
*
* @param after the timestamp specified in the call to
* <code>enqueueKeyEvents</code>, or any value < 0
* <code>enqueueKeyEvents</code>, or any value &lt; 0
* @param untilFocused the Component specified in the call to
* <code>enqueueKeyEvents</code>
* @see #enqueueKeyEvents
......
......@@ -61,7 +61,7 @@ import java.security.AccessControlException;
* <p>
* The default layout for a dialog is <code>BorderLayout</code>.
* <p>
* A dialog may have its native decorations (i.e. Frame & Titlebar) turned off
* A dialog may have its native decorations (i.e. Frame &amp; Titlebar) turned off
* with <code>setUndecorated</code>. This can only be done while the dialog
* is not {@link Component#isDisplayable() displayable}.
* <p>
......
......@@ -524,7 +524,7 @@ public class Event implements java.io.Serializable {
* This field has been replaced by MouseEvent.getClickCount().
*
* @serial
* @see java.awt.event.MouseEvent#getClickCount().
* @see java.awt.event.MouseEvent#getClickCount()
*/
public int clickCount;
......
......@@ -265,12 +265,12 @@ public class Frame extends Window implements MenuContainer {
*
* <p>Note that the correct test for frame being fully maximized is
* <pre>
* (state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
* (state &amp; Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
* </pre>
*
* <p>To test is frame is maximized in <em>some</em> direction use
* <pre>
* (state & Frame.MAXIMIZED_BOTH) != 0
* (state &amp; Frame.MAXIMIZED_BOTH) != 0
* </pre>
*
* @see #setExtendedState(int)
......
......@@ -30,7 +30,7 @@ package java.awt;
* <code>GridBagLayout</code> class.
*
* @author Doug Stein
* @author Bill Spitzak (orignial NeWS & OLIT implementation)
* @author Bill Spitzak (orignial NeWS &amp; OLIT implementation)
* @see java.awt.GridBagLayout
* @since JDK1.0
*/
......
......@@ -120,9 +120,9 @@ import java.util.Arrays;
* Orientation relative values are interpreted relative to the container's
* <code>ComponentOrientation</code> property while absolute values
* are not. Baseline relative values are calculated relative to the
* baseline. Valid values are:</dd>
* baseline. Valid values are:
* <p>
* <center><table BORDER=0 COLS=3 WIDTH=800
* <center><table BORDER=0 WIDTH=800
* SUMMARY="absolute, relative and baseline values as described above">
* <tr>
* <th><P ALIGN="LEFT">Absolute Values</th>
......@@ -131,6 +131,7 @@ import java.util.Arrays;
* </tr>
* <tr>
* <td>
* <ul style="list-style-type:none">
* <li><code>GridBagConstraints.NORTH</code></li>
* <li><code>GridBagConstraints.SOUTH</code></li>
* <li><code>GridBagConstraints.WEST</code></li>
......@@ -140,8 +141,10 @@ import java.util.Arrays;
* <li><code>GridBagConstraints.SOUTHWEST</code></li>
* <li><code>GridBagConstraints.SOUTHEAST</code></li>
* <li><code>GridBagConstraints.CENTER</code> (the default)</li>
* </ul>
* </td>
* <td>
* <ul style="list-style-type:none">
* <li><code>GridBagConstraints.PAGE_START</code></li>
* <li><code>GridBagConstraints.PAGE_END</code></li>
* <li><code>GridBagConstraints.LINE_START</code></li>
......@@ -150,8 +153,10 @@ import java.util.Arrays;
* <li><code>GridBagConstraints.FIRST_LINE_END</code></li>
* <li><code>GridBagConstraints.LAST_LINE_START</code></li>
* <li><code>GridBagConstraints.LAST_LINE_END</code></li>
* </ul>
* </td>
* <td>
* <ul style="list-style-type:none">
* <li><code>GridBagConstraints.BASELINE</code></li>
* <li><code>GridBagConstraints.BASELINE_LEADING</code></li>
* <li><code>GridBagConstraints.BASELINE_TRAILING</code></li>
......@@ -161,9 +166,10 @@ import java.util.Arrays;
* <li><code>GridBagConstraints.BELOW_BASELINE</code></li>
* <li><code>GridBagConstraints.BELOW_BASELINE_LEADING</code></li>
* <li><code>GridBagConstraints.BELOW_BASELINE_TRAILING</code></li>
* </ul>
* </td>
* </tr>
* </table></center><p>
* </table></center>
* <dt>{@link GridBagConstraints#weightx},
* {@link GridBagConstraints#weighty}
* <dd>Used to determine how to distribute space, which is
......@@ -246,7 +252,7 @@ import java.util.Arrays;
* left-to-right container and Figure 3 shows the layout for a horizontal,
* right-to-left container.
* <p>
* <center><table COLS=2 WIDTH=600 summary="layout">
* <center><table WIDTH=600 summary="layout">
* <tr ALIGN=CENTER>
* <td>
* <img src="doc-files/GridBagLayout-1.gif" alt="The preceeding text describes this graphic (Figure 1)." ALIGN=center HSPACE=10 VSPACE=7>
......@@ -349,7 +355,7 @@ import java.util.Arrays;
* </pre></blockquote><hr>
* <p>
* @author Doug Stein
* @author Bill Spitzak (orignial NeWS & OLIT implementation)
* @author Bill Spitzak (orignial NeWS &amp; OLIT implementation)
* @see java.awt.GridBagConstraints
* @see java.awt.GridBagLayoutInfo
* @see java.awt.ComponentOrientation
......
......@@ -55,7 +55,7 @@ package java.awt;
* If the container's <code>ComponentOrientation</code> property is horizontal
* and right-to-left, the example produces the output shown in Figure 2.
* <p>
* <center><table COLS=2 WIDTH=600 summary="layout">
* <center><table WIDTH=600 summary="layout">
* <tr ALIGN=CENTER>
* <td><img SRC="doc-files/GridLayout-1.gif"
* alt="Shows 6 buttons in rows of 2. Row 1 shows buttons 1 then 2.
......
......@@ -2034,7 +2034,7 @@ public abstract class KeyboardFocusManager
* oldest</b> timestamp (if any) should be cancelled.
*
* @param after the timestamp specified in the call to
* <code>enqueueKeyEvents</code>, or any value < 0
* <code>enqueueKeyEvents</code>, or any value &lt; 0
* @param untilFocused the Component specified in the call to
* <code>enqueueKeyEvents</code>
* @see #enqueueKeyEvents
......
......@@ -43,7 +43,7 @@ import javax.accessibility.*;
* This is what a menu bar might look like:
* <p>
* <img src="doc-files/MenuBar-1.gif"
* <alt="Diagram of MenuBar containing 2 menus: Examples and Options.
* alt="Diagram of MenuBar containing 2 menus: Examples and Options.
* Examples menu is expanded showing items: Basic, Simple, Check, and More Examples."
* ALIGN=center HSPACE=10 VSPACE=7>
* <p>
......
......@@ -247,7 +247,7 @@ public class ScrollPane extends Container implements Accessible {
* component is removed and the new one is added.
* @param comp the component to be added
* @param constraints not applicable
* @param index position of child component (must be <= 0)
* @param index position of child component (must be &lt;= 0)
*/
protected final void addImpl(Component comp, Object constraints, int index) {
synchronized (getTreeLock()) {
......
......@@ -220,7 +220,7 @@ public class ScrollPaneAdjustable implements Adjustable, Serializable {
* This method is public for this class to properly implement
* <code>Adjustable</code> interface.
*
* @throws <code>AWTError</code> Always throws an error when called.
* @throws AWTError Always throws an error when called.
*/
public void setMinimum(int min) {
throw new AWTError(SCROLLPANE_ONLY);
......@@ -237,7 +237,7 @@ public class ScrollPaneAdjustable implements Adjustable, Serializable {
* This method is public for this class to properly implement
* <code>Adjustable</code> interface.
*
* @throws <code>AWTError</code> Always throws an error when called.
* @throws AWTError Always throws an error when called.
*/
public void setMaximum(int max) {
throw new AWTError(SCROLLPANE_ONLY);
......@@ -274,7 +274,7 @@ public class ScrollPaneAdjustable implements Adjustable, Serializable {
* This method is public for this class to properly implement
* <code>Adjustable</code> interface.
*
* @throws <code>AWTError</code> Always throws an error when called.
* @throws AWTError Always throws an error when called.
*/
public void setVisibleAmount(int v) {
throw new AWTError(SCROLLPANE_ONLY);
......
......@@ -63,8 +63,8 @@ import sun.awt.AWTAccessor;
*
* <p>The following code snippet demonstrates how to access
* and customize the system tray:
* <code>
* <pre>
* <code>
* {@link TrayIcon} trayIcon = null;
* if (SystemTray.isSupported()) {
* // get the SystemTray instance
......@@ -109,8 +109,8 @@ import sun.awt.AWTAccessor;
* trayIcon.{@link TrayIcon#setImage(java.awt.Image) setImage}(updatedImage);
* }
* // ...
* </pre>
* </code>
* </pre>
*
* @since 1.6
* @see TrayIcon
......
......@@ -972,7 +972,7 @@ public class TextComponent extends Component implements Accessible {
* coordinates. If the index is invalid a null rectangle
* is returned.
*
* @param i the index into the String >= 0
* @param i the index into the String &gt;= 0
* @return the screen coordinates of the character's bounding box
*/
public Rectangle getCharacterBounds(int i) {
......@@ -982,7 +982,7 @@ public class TextComponent extends Component implements Accessible {
/**
* Returns the number of characters (valid indicies)
*
* @return the number of characters >= 0
* @return the number of characters &gt;= 0
*/
public int getCharCount() {
return TextComponent.this.getText().length();
......@@ -1018,7 +1018,7 @@ public class TextComponent extends Component implements Accessible {
* Return 0 if the text is empty, or the caret position
* if no selection.
*
* @return the index into the text of the start of the selection >= 0
* @return the index into the text of the start of the selection &gt;= 0
*/
public int getSelectionStart() {
return TextComponent.this.getSelectionStart();
......@@ -1031,7 +1031,7 @@ public class TextComponent extends Component implements Accessible {
* Return 0 if the text is empty, or the caret position
* if no selection.
*
* @return the index into teh text of the end of the selection >= 0
* @return the index into teh text of the end of the selection &gt;= 0
*/
public int getSelectionEnd() {
return TextComponent.this.getSelectionEnd();
......@@ -1056,7 +1056,7 @@ public class TextComponent extends Component implements Accessible {
*
* @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
* or AccessibleText.SENTENCE to retrieve
* @param index an index within the text >= 0
* @param index an index within the text &gt;= 0
* @return the letter, word, or sentence,
* null for an invalid index or part
*/
......@@ -1122,7 +1122,7 @@ public class TextComponent extends Component implements Accessible {
*
* @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
* or AccessibleText.SENTENCE to retrieve
* @param index an index within the text >= 0
* @param index an index within the text &gt;= 0
* @return the letter, word, or sentence, null for an invalid
* index or part
*/
......@@ -1175,7 +1175,7 @@ public class TextComponent extends Component implements Accessible {
*
* @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
* or AccessibleText.SENTENCE to retrieve
* @param index an index within the text >= 0
* @param index an index within the text &gt;= 0
* @return the letter, word, or sentence, null for an invalid index
* or part
*/
......
......@@ -503,7 +503,7 @@ public class TextField extends TextComponent {
*
* @see #addActionListener
* @see #removeActionListener
* @see java.awt.event#ActionListener
* @see java.awt.event.ActionListener
* @since 1.4
*/
public synchronized ActionListener[] getActionListeners() {
......
......@@ -1075,7 +1075,6 @@ public class Window extends Container implements Accessible {
* Hide this Window, its subcomponents, and all of its owned children.
* The Window and its subcomponents can be made visible again
* with a call to {@code show}.
* </p>
* @see #show
* @see #dispose
* @deprecated As of JDK version 1.5, replaced by
......@@ -3373,27 +3372,27 @@ public class Window extends Container implements Accessible {
* this property of the Window.
* <p>
* For example, after the following code is executed:
* <pre><blockquote>
* <pre>
* setLocationByPlatform(true);
* setVisible(true);
* boolean flag = isLocationByPlatform();
* </blockquote></pre>
* </pre>
* The window will be shown at platform's default location and
* {@code flag} will be {@code false}.
* <p>
* In the following sample:
* <pre><blockquote>
* <pre>
* setLocationByPlatform(true);
* setLocation(10, 10);
* boolean flag = isLocationByPlatform();
* setVisible(true);
* </blockquote></pre>
* </pre>
* The window will be shown at (10, 10) and {@code flag} will be
* {@code false}.
*
* @param locationByPlatform {@code true} if this Window should appear
* at the default location, {@code false} if at the current location
* @throws {@code IllegalComponentStateException} if the window
* @throws IllegalComponentStateException if the window
* is showing on screen and locationByPlatform is {@code true}.
* @see #setLocation
* @see #isShowing
......
......@@ -454,7 +454,7 @@ public class DataFlavor implements Externalizable, Cloneable {
/**
* Constructs a <code>DataFlavor</code> from a <code>mimeType</code> string.
* The string can specify a "class=<fully specified Java class name>"
* The string can specify a "class=&lt;fully specified Java class name&gt;"
* parameter to create a <code>DataFlavor</code> with the desired
* representation class. If the string does not contain "class=" parameter,
* <code>java.io.InputStream</code> is used as default.
......
......@@ -60,9 +60,9 @@ public interface MouseMotionListener extends EventListener {
* mouse button is released (regardless of whether the mouse position
* is within the bounds of the component).
* <p>
* Due to platform-dependent Drag&Drop implementations,
* Due to platform-dependent Drag&amp;Drop implementations,
* <code>MOUSE_DRAGGED</code> events may not be delivered during a native
* Drag&Drop operation.
* Drag&amp;Drop operation.
*/
public void mouseDragged(MouseEvent e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册