You need to sign in or sign up before continuing.
提交 758c8657 编写于 作者: Y yan

8025234: [javadoc] fix some errors in javax.swing.**

Reviewed-by: alexsch, malenkov
Contributed-by: NDmitry Ginzburg <dmitry.x.ginzburg@oracle.com>
上级 544c7984
......@@ -1381,7 +1381,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
* If <code>true</code> and the button has a border,
* the border is painted. The default value for the
* <code>borderPainted</code> property is <code>true</code>.
* <p/>
* <p>
* Some look and feels might not support
* the <code>borderPainted</code> property,
* in which case they ignore this.
......@@ -1476,7 +1476,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
* This function may cause the component's opaque property to change.
* <p>
* The exact behavior of calling this function varies on a
* component-by-component and L&F-by-L&F basis.
* component-by-component and L&amp;F-by-L&amp;F basis.
*
* @param b if true, the content should be filled; if false
* the content area is not filled
......@@ -1702,7 +1702,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
* @see #getMultiClickThreshhold
* @param threshhold the amount of time required between mouse
* press events to generate corresponding action events
* @exception IllegalArgumentException if threshhold < 0
* @exception IllegalArgumentException if threshhold &lt; 0
* @since 1.4
*/
public void setMultiClickThreshhold(long threshhold) {
......@@ -1787,7 +1787,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
/**
* Returns the L&F object that renders this component.
* Returns the L&amp;F object that renders this component.
* @return the ButtonUI object
* @see #setUI
*/
......@@ -1797,8 +1797,8 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
/**
* Sets the L&F object that renders this component.
* @param ui the <code>ButtonUI</code> L&F object
* Sets the L&amp;F object that renders this component.
* @param ui the <code>ButtonUI</code> L&amp;F object
* @see #getUI
* @beaninfo
* bound: true
......@@ -2722,7 +2722,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
*
* @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
* @since 1.3
......@@ -2769,7 +2769,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
*
* @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
* @since 1.3
......@@ -2833,7 +2833,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
*
* @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
* @since 1.3
......
......@@ -69,7 +69,7 @@ import java.beans.*;
* are desired, and use simple <code>ActionListener</code>s elsewhere.
* <p>
*
* <h4><a name="buttonActions"></a>Swing Components Supporting <code>Action</code></h4>
* <h3><a name="buttonActions"></a>Swing Components Supporting <code>Action</code></h3>
* <p>
* Many of Swing's components have an <code>Action</code> property. When
* an <code>Action</code> is set on a component, the following things
......@@ -95,8 +95,7 @@ import java.beans.*;
* button's corresponding property being set to <code>null</code>.
* <p>
* <table border="1" cellpadding="1" cellspacing="0"
* summary="Supported Action properties"
* valign="top" >
* summary="Supported Action properties">
* <tr valign="top" align="left">
* <th style="background-color:#CCCCFF" align="left">Component Property
* <th style="background-color:#CCCCFF" align="left">Components
......
......@@ -155,7 +155,7 @@ public class Box extends JComponent implements Accessible {
* in which case it takes its share of available space,
* just like any other component that has no maximum height.
*
* @param width the width of the invisible component, in pixels >= 0
* @param width the width of the invisible component, in pixels &gt;= 0
* @return the component
* @see #createVerticalStrut
* @see #createGlue
......@@ -179,7 +179,7 @@ public class Box extends JComponent implements Accessible {
* in which case it takes its share of available space,
* just like any other component that has no maximum width.
*
* @param height the height of the invisible component, in pixels >= 0
* @param height the height of the invisible component, in pixels &gt;= 0
* @return the component
* @see #createHorizontalStrut
* @see #createGlue
......
......@@ -287,7 +287,7 @@ public class BoxLayout implements LayoutManager2, Serializable {
* in the specified target container.
*
* @param target the container that needs to be laid out
* @return the dimensions >= 0 && <= Integer.MAX_VALUE
* @return the dimensions &gt;= 0 &amp;&amp; &lt;= Integer.MAX_VALUE
* @exception AWTError if the target isn't the container specified to the
* BoxLayout constructor
* @see Container
......@@ -313,7 +313,7 @@ public class BoxLayout implements LayoutManager2, Serializable {
* contained in the specified target container.
*
* @param target the container that needs to be laid out
* @return the dimensions >= 0 && <= Integer.MAX_VALUE
* @return the dimensions &gt;= 0 &amp;&amp; &lt;= Integer.MAX_VALUE
* @exception AWTError if the target isn't the container specified to the
* BoxLayout constructor
* @see #preferredLayoutSize
......@@ -338,7 +338,7 @@ public class BoxLayout implements LayoutManager2, Serializable {
* to lay out the components it contains.
*
* @param target the container that needs to be laid out
* @return the dimensions >= 0 && <= Integer.MAX_VALUE
* @return the dimensions &gt;= 0 &amp;&amp; &lt;= Integer.MAX_VALUE
* @exception AWTError if the target isn't the container specified to the
* BoxLayout constructor
* @see #preferredLayoutSize
......@@ -365,7 +365,7 @@ public class BoxLayout implements LayoutManager2, Serializable {
* to place the children along the X axis will be returned.
*
* @param target the container
* @return the alignment >= 0.0f && <= 1.0f
* @return the alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f
* @exception AWTError if the target isn't the container specified to the
* BoxLayout constructor
*/
......@@ -382,7 +382,7 @@ public class BoxLayout implements LayoutManager2, Serializable {
* to place the children along the Y axis will be returned.
*
* @param target the container
* @return the alignment >= 0.0f && <= 1.0f
* @return the alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f
* @exception AWTError if the target isn't the container specified to the
* BoxLayout constructor
*/
......
......@@ -96,7 +96,7 @@ public class CellRendererPane extends Container implements Accessible
/**
* If the specified component is already a child of this then we don't
* bother doing anything - stacking order doesn't matter for cell
* renderer components (CellRendererPane doesn't paint anyway).<
* renderer components (CellRendererPane doesn't paint anyway).
*/
protected void addImpl(Component x, Object constraints, int index) {
if (x.getParent() == this) {
......
......@@ -637,7 +637,7 @@ public class DefaultListSelectionModel implements ListSelectionModel, Cloneable,
* Remove the indices in the interval index0,index1 (inclusive) from
* the selection model. This is typically called to sync the selection
* model width a corresponding change in the data model. Note
* that (as always) index0 need not be <= index1.
* that (as always) index0 need not be &lt;= index1.
*/
public void removeIndexInterval(int index0, int index1)
{
......
......@@ -26,13 +26,13 @@
package javax.swing;
/** DesktopManager objects are owned by a JDesktopPane object. They are responsible
* for implementing L&F specific behaviors for the JDesktopPane. JInternalFrame
* for implementing L&amp;F specific behaviors for the JDesktopPane. JInternalFrame
* implementations should delegate specific behaviors to the DesktopManager. For
* instance, if a JInternalFrame was asked to iconify, it should try:
* <PRE>
* getDesktopPane().getDesktopManager().iconifyFrame(frame);
* </PRE>
* This delegation allows each L&F to provide custom behaviors for desktop-specific
* This delegation allows each L&amp;F to provide custom behaviors for desktop-specific
* actions. (For example, how and where the internal frame's icon would appear.)
* <p>This class provides a policy for the various JInternalFrame methods, it is not
* meant to be called directly rather the various JInternalFrame methods will call
......
......@@ -80,7 +80,7 @@ import static javax.swing.SwingConstants.VERTICAL;
* axis. The sequential group contains three components. A parallel group
* was used along the vertical axis.
* <p style="text-align:center">
* <img src="doc-files/groupLayout.1.gif">
* <img src="doc-files/groupLayout.1.gif" alt="Sequential group along the horizontal axis in three components">
* <p>
* To reinforce that each axis is treated independently the diagram shows
* the range of each group and element along each axis. The
......@@ -102,7 +102,7 @@ import static javax.swing.SwingConstants.VERTICAL;
* the vertical axis.
* <p>
* <p style="text-align:center">
* <img src="doc-files/groupLayout.2.gif">
* <img src="doc-files/groupLayout.2.gif" alt="Sequential group along the vertical axis in three components">
* <p>
* As {@code c1} is the largest of the three components, the parallel
* group is sized to {@code c1}. As {@code c2} and {@code c3} are smaller
......@@ -116,7 +116,7 @@ import static javax.swing.SwingConstants.VERTICAL;
* The following diagram shows a sequential group along both the horizontal
* and vertical axis.
* <p style="text-align:center">
* <img src="doc-files/groupLayout.3.gif">
* <img src="doc-files/groupLayout.3.gif" alt="Sequential group along both the horizontal and vertical axis in three components">
* <p>
* {@code GroupLayout} provides the ability to insert gaps between
* {@code Component}s. The size of the gap is determined by an
......@@ -173,7 +173,7 @@ import static javax.swing.SwingConstants.VERTICAL;
* <p>
* When run the following is produced.
* <p style="text-align:center">
* <img src="doc-files/groupLayout.example.png">
* <img src="doc-files/groupLayout.example.png" alt="Produced horizontal/vertical form">
* <p>
* This layout consists of the following.
* <ul><li>The horizontal axis consists of a sequential group containing two
......
......@@ -4906,12 +4906,12 @@ public abstract class JComponent extends Container implements Serializable,
/**
* Returns {@code true} if a paint triggered on a child component should cause
* painting to originate from this Component, or one of its ancestors.
* <p/>
* <p>
* Calling {@link #repaint} or {@link #paintImmediately(int, int, int, int)}
* on a Swing component will result in calling
* the {@link JComponent#paintImmediately(int, int, int, int)} method of
* the first ancestor which {@code isPaintingOrigin()} returns {@code true}, if there are any.
* <p/>
* <p>
* {@code JComponent} subclasses that need to be painted when any of their
* children are repainted should override this method to return {@code true}.
*
......
......@@ -103,7 +103,7 @@ import javax.accessibility.*;
* fragment is a possible hyperlink listener implementation, that treats
* HTML frame events specially, and simply displays any other activated
* hyperlinks.
* <code><pre>
* <pre>
&nbsp; class Hyperactive implements HyperlinkListener {
&nbsp;
......@@ -125,7 +125,7 @@ import javax.accessibility.*;
&nbsp; }
&nbsp; }
* </pre></code>
* </pre>
* <p>
* For information on customizing how <b>text/html</b> is rendered please see
* {@link #W3C_LENGTH_UNITS} and {@link #HONOR_DISPLAY_PROPERTIES}
......
......@@ -67,7 +67,7 @@ import java.lang.ref.WeakReference;
* <pre>
* JFileChooser chooser = new JFileChooser();
* FileNameExtensionFilter filter = new FileNameExtensionFilter(
* "JPG & GIF Images", "jpg", "gif");
* "JPG &amp; GIF Images", "jpg", "gif");
* chooser.setFileFilter(filter);
* int returnVal = chooser.showOpenDialog(parent);
* if(returnVal == JFileChooser.APPROVE_OPTION) {
......@@ -634,7 +634,7 @@ public class JFileChooser extends JComponent implements Accessible {
/**
* Pops up an "Open File" file chooser dialog. Note that the
* text that appears in the approve button is determined by
* the L&F.
* the L&amp;F.
*
* @param parent the parent component of the dialog,
* can be <code>null</code>;
......@@ -659,7 +659,7 @@ public class JFileChooser extends JComponent implements Accessible {
/**
* Pops up a "Save File" file chooser dialog. Note that the
* text that appears in the approve button is determined by
* the L&F.
* the L&amp;F.
*
* @param parent the parent component of the dialog,
* can be <code>null</code>;
......@@ -861,7 +861,7 @@ public class JFileChooser extends JComponent implements Accessible {
* @beaninfo
* preferred: true
* bound: true
* description: Sets whether the approve & cancel buttons are shown.
* description: Sets whether the approve &amp; cancel buttons are shown.
*
* @see #getControlButtonsAreShown
* @see #CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY
......@@ -1841,7 +1841,7 @@ public class JFileChooser extends JComponent implements Accessible {
}
/**
* Returns a string that specifies the name of the L&F class
* Returns a string that specifies the name of the L&amp;F class
* that renders this component.
*
* @return the string "FileChooserUI"
......@@ -1849,16 +1849,16 @@ public class JFileChooser extends JComponent implements Accessible {
* @see UIDefaults#getUI
* @beaninfo
* expert: true
* description: A string that specifies the name of the L&F class.
* description: A string that specifies the name of the L&amp;F class.
*/
public String getUIClassID() {
return uiClassID;
}
/**
* Gets the UI object which implements the L&F for this component.
* Gets the UI object which implements the L&amp;F for this component.
*
* @return the FileChooserUI object that implements the FileChooserUI L&F
* @return the FileChooserUI object that implements the FileChooserUI L&amp;F
*/
public FileChooserUI getUI() {
return (FileChooserUI) ui;
......
......@@ -237,7 +237,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible
/**
* Returns the L&F object that renders this component.
* Returns the L&amp;F object that renders this component.
*
* @return LabelUI object
*/
......@@ -247,9 +247,9 @@ public class JLabel extends JComponent implements SwingConstants, Accessible
/**
* Sets the L&F object that renders this component.
* Sets the L&amp;F object that renders this component.
*
* @param ui the LabelUI L&F object
* @param ui the LabelUI L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -277,7 +277,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible
/**
* Returns a string that specifies the name of the l&f class
* Returns a string that specifies the name of the l&amp;f class
* that renders this component.
*
* @return String "LabelUI"
......@@ -545,8 +545,8 @@ public class JLabel extends JComponent implements SwingConstants, Accessible
*
* @since 1.4
* @param index Index into the String to underline
* @exception IllegalArgumentException will be thrown if <code>index</code
* is >= length of the text, or < -1
* @exception IllegalArgumentException will be thrown if <code>index</code>
* is &gt;= length of the text, or &lt; -1
*
* @beaninfo
* bound: true
......@@ -1251,7 +1251,7 @@ public class JLabel extends JComponent implements SwingConstants, 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
* @since 1.3
......@@ -1298,7 +1298,7 @@ public class JLabel extends JComponent implements SwingConstants, 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
* @since 1.3
......@@ -1362,7 +1362,7 @@ public class JLabel extends JComponent implements SwingConstants, 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
* @since 1.3
......
......@@ -146,7 +146,7 @@ import static sun.swing.SwingUtilities2.Section.*;
* Responsibility for listening to selection changes in order to keep the list's
* visual representation up to date lies with the list's {@code ListUI}.
* <p>
* <a name="renderer">
* <a name="renderer"></a>
* Painting of cells in a {@code JList} is handled by a delegate called a
* cell renderer, installed on the list as the {@code cellRenderer} property.
* The renderer provides a {@code java.awt.Component} that is used
......@@ -202,7 +202,7 @@ import static sun.swing.SwingUtilities2.Section.*;
* To avoid these calculations, you can set a {@code fixedCellWidth} and
* {@code fixedCellHeight} on the list, or have these values calculated
* automatically based on a single prototype value:
* <a name="prototype_example">
* <a name="prototype_example"></a>
* <pre>
* {@code
* JList<String> bigDataList = new JList<String>(bigData);
......@@ -1512,7 +1512,7 @@ public class JList<E> extends JComponent implements Scrollable, Accessible
* tooltip text on the cell level, by using {@code setToolTipText} on your
* cell renderer component.
* <p>
* <bold>Note:</bold> For <code>JList</code> to properly display the
* <strong>Note:</strong> For <code>JList</code> to properly display the
* tooltips of its renderers in this manner, <code>JList</code> must be a
* registered component with the <code>ToolTipManager</code>. This registration
* is done automatically in the constructor. However, if at a later point
......
......@@ -225,7 +225,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
/**
* Returns the name of the L&F class that renders this component.
* Returns the name of the L&amp;F class that renders this component.
*
* @return the string "MenuUI"
* @see JComponent#getUIClassID
......@@ -490,7 +490,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
/**
* Returns the suggested delay, in milliseconds, before submenus
* are popped up or down.
* Each look and feel (L&F) may determine its own policy for
* Each look and feel (L&amp;F) may determine its own policy for
* observing the <code>delay</code> property.
* In most cases, the delay is not observed for top level menus
* or while dragging. The default for <code>delay</code> is 0.
......@@ -506,7 +506,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
/**
* Sets the suggested delay before the menu's <code>PopupMenu</code>
* is popped up or down. Each look and feel (L&F) may determine
* is popped up or down. Each look and feel (L&amp;F) may determine
* it's own policy for observing the delay property. In most cases,
* the delay is not observed for top level menus or while dragging.
* This method is a property of the look and feel code and is used
......@@ -676,7 +676,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
* @param pos an integer specifying the position at which to add the
* new menu item
* @exception IllegalArgumentException when the value of
* <code>pos</code> < 0
* <code>pos</code> &lt; 0
*/
public void insert(String s, int pos) {
if (pos < 0) {
......@@ -695,7 +695,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
* new <code>JMenuitem</code>
* @return the new menu item
* @exception IllegalArgumentException if the value of
* <code>pos</code> < 0
* <code>pos</code> &lt; 0
*/
public JMenuItem insert(JMenuItem mi, int pos) {
if (pos < 0) {
......@@ -714,7 +714,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
* @param pos an integer specifying the position at which to add the
* new menu item
* @exception IllegalArgumentException if the value of
* <code>pos</code> < 0
* <code>pos</code> &lt; 0
*/
public JMenuItem insert(Action a, int pos) {
if (pos < 0) {
......@@ -735,7 +735,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
* @param index an integer specifying the position at which to
* insert the menu separator
* @exception IllegalArgumentException if the value of
* <code>index</code> < 0
* <code>index</code> &lt; 0
*/
public void insertSeparator(int index) {
if (index < 0) {
......@@ -754,7 +754,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
*
* @param pos an integer specifying the position
* @exception IllegalArgumentException if the value of
* <code>pos</code> < 0
* <code>pos</code> &lt; 0
* @return the menu item at the specified position; or <code>null</code>
* if the item as the specified position is not a menu item
*/
......@@ -811,7 +811,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement
*
* @param pos the position of the item to be removed
* @exception IllegalArgumentException if the value of
* <code>pos</code> < 0, or if <code>pos</code>
* <code>pos</code> &lt; 0, or if <code>pos</code>
* is greater than the number of menu items
*/
public void remove(int pos) {
......
......@@ -130,9 +130,9 @@ public class JMenuBar extends JComponent implements Accessible,MenuElement
}
/**
* Sets the L&F object that renders this component.
* Sets the L&amp;F object that renders this component.
*
* @param ui the new MenuBarUI L&F object
* @param ui the new MenuBarUI L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -155,7 +155,7 @@ public class JMenuBar extends JComponent implements Accessible,MenuElement
/**
* Returns the name of the L&F class that renders this component.
* Returns the name of the L&amp;F class that renders this component.
*
* @return the string "MenuBarUI"
* @see JComponent#getUIClassID
......
......@@ -367,7 +367,7 @@ public class JTextField extends JTextComponent implements SwingConstants {
/**
* Returns the number of columns in this <code>TextField</code>.
*
* @return the number of columns >= 0
* @return the number of columns &gt;= 0
*/
public int getColumns() {
return columns;
......@@ -377,7 +377,7 @@ public class JTextField extends JTextComponent implements SwingConstants {
* Sets the number of columns in this <code>TextField</code>,
* and then invalidate the layout.
*
* @param columns the number of columns >= 0
* @param columns the number of columns &gt;= 0
* @exception IllegalArgumentException if <code>columns</code>
* is less than 0
* @beaninfo
......@@ -402,7 +402,7 @@ public class JTextField extends JTextComponent implements SwingConstants {
* character <em>m</em> for the font used. This method can be
* redefined to be some alternative amount
*
* @return the column width >= 1
* @return the column width &gt;= 1
*/
protected int getColumnWidth() {
if (columnWidth == 0) {
......@@ -744,7 +744,7 @@ public class JTextField extends JTextComponent implements SwingConstants {
/**
* Gets the scroll offset, in pixels.
*
* @return the offset >= 0
* @return the offset &gt;= 0
*/
public int getScrollOffset() {
return visibility.getValue();
......@@ -753,7 +753,7 @@ public class JTextField extends JTextComponent implements SwingConstants {
/**
* Sets the scroll offset, in pixels.
*
* @param scrollOffset the offset >= 0
* @param scrollOffset the offset &gt;= 0
*/
public void setScrollOffset(int scrollOffset) {
visibility.setValue(scrollOffset);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册