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