提交 028c6992 编写于 作者: Y yan

8025230: [cleanup] some more javadoc formatting fixes for swing

Reviewed-by: alexsch
上级 400e3195
......@@ -127,7 +127,7 @@ public class JPanel extends JComponent implements Accessible
}
/**
* Returns the look and feel (L&F) object that renders this component.
* Returns the look and feel (L&F) object that renders this component.
*
* @return the PanelUI object that renders this component
* @since 1.4
......@@ -138,9 +138,9 @@ public class JPanel extends JComponent implements Accessible
/**
* Sets the look and feel (L&F) object that renders this component.
* Sets the look and feel (L&F) object that renders this component.
*
* @param ui the PanelUI L&F object
* @param ui the PanelUI L&F object
* @see UIDefaults#getUI
* @since 1.4
* @beaninfo
......@@ -154,7 +154,7 @@ public class JPanel 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&F class
* that renders this component.
*
* @return "PanelUI"
......@@ -162,7 +162,7 @@ public class JPanel 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&F class.
*/
public String getUIClassID() {
return uiClassID;
......
......@@ -101,7 +101,7 @@ public class JPasswordField extends JTextField {
* number of columns. A default model is created, and the initial string
* is set to <code>null</code>.
*
* @param columns the number of columns >= 0
* @param columns the number of columns &gt;= 0
*/
public JPasswordField(int columns) {
this(null, null, columns);
......@@ -113,7 +113,7 @@ public class JPasswordField extends JTextField {
* the default.
*
* @param text the text to be displayed, <code>null</code> if none
* @param columns the number of columns >= 0
* @param columns the number of columns &gt;= 0
*/
public JPasswordField(String text, int columns) {
this(null, text, columns);
......@@ -130,7 +130,7 @@ public class JPasswordField extends JTextField {
* @param doc the text storage to use
* @param txt the text to be displayed, <code>null</code> if none
* @param columns the number of columns to use to calculate
* the preferred width >= 0; if columns is set to zero, the
* the preferred width &gt;= 0; if columns is set to zero, the
* preferred width will be whatever naturally results from
* the component implementation
*/
......@@ -143,7 +143,7 @@ public class JPasswordField extends JTextField {
}
/**
* 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 "PasswordFieldUI"
* @see JComponent#getUIClassID
......@@ -271,8 +271,8 @@ public class JPasswordField extends JTextField {
* <code>getPassword</code> method instead.
* @deprecated As of Java 2 platform v1.2,
* replaced by <code>getPassword</code>.
* @param offs the offset >= 0
* @param len the length >= 0
* @param offs the offset &gt;= 0
* @param len the length &gt;= 0
* @return the text
* @exception BadLocationException if the offset or length are invalid
*/
......
......@@ -196,7 +196,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
/**
* Returns the look and feel (L&F) object that renders this component.
* Returns the look and feel (L&amp;F) object that renders this component.
*
* @return the <code>PopupMenuUI</code> object that renders this component
*/
......@@ -205,9 +205,9 @@ public class JPopupMenu 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 <code>PopupMenuUI</code> L&F object
* @param ui the new <code>PopupMenuUI</code> L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -230,7 +230,7 @@ public class JPopupMenu 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 "PopupMenuUI"
* @see JComponent#getUIClassID
......@@ -461,7 +461,7 @@ public class JPopupMenu extends JComponent 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 the value of
* <code>pos</code> &lt; 0, or if the value of
* <code>pos</code> is greater than the
* number of items
*/
......@@ -560,7 +560,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
* @param a the <code>Action</code> object to insert
* @param index specifies the position at which to insert the
* <code>Action</code>, where 0 is the first
* @exception IllegalArgumentException if <code>index</code> < 0
* @exception IllegalArgumentException if <code>index</code> &lt; 0
* @see Action
*/
public void insert(Action a, int index) {
......@@ -576,7 +576,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
* @param component the <code>Component</code> to insert
* @param index specifies the position at which
* to insert the component, where 0 is the first
* @exception IllegalArgumentException if <code>index</code> < 0
* @exception IllegalArgumentException if <code>index</code> &lt; 0
*/
public void insert(Component component, int index) {
if (index < 0) {
......@@ -1535,7 +1535,7 @@ public class JPopupMenu 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 "PopupMenuSeparatorUI"
* @see JComponent#getUIClassID
......
......@@ -193,7 +193,7 @@ public class JRadioButton extends JToggleButton implements Accessible {
/**
* Returns the name of the L&F class
* Returns the name of the L&amp;F class
* that renders this component.
*
* @return String "RadioButtonUI"
......@@ -201,7 +201,7 @@ public class JRadioButton extends JToggleButton 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;
......
......@@ -181,7 +181,7 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible {
}
/**
* 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 "RadioButtonMenuItemUI"
* @see JComponent#getUIClassID
......
......@@ -448,7 +448,7 @@ public class JRootPane extends JComponent implements Accessible {
}
/**
* Returns the L&F object that renders this component.
* Returns the L&amp;F object that renders this component.
*
* @return <code>LabelUI</code> object
* @since 1.3
......@@ -458,9 +458,9 @@ public class JRootPane extends JComponent implements Accessible {
}
/**
* Sets the L&F object that renders this component.
* Sets the L&amp;F object that renders this component.
*
* @param ui the <code>LabelUI</code> L&F object
* @param ui the <code>LabelUI</code> L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -486,7 +486,7 @@ public class JRootPane 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 "RootPaneUI"
......
......@@ -353,7 +353,7 @@ public class JScrollPane extends JComponent implements ScrollPaneConstants, Acce
/**
* Returns the look and feel (L&F) object that renders this component.
* Returns the look and feel (L&amp;F) object that renders this component.
*
* @return the <code>ScrollPaneUI</code> object that renders this
* component
......@@ -371,9 +371,9 @@ public class JScrollPane extends JComponent implements ScrollPaneConstants, Acce
/**
* Sets the <code>ScrollPaneUI</code> object that provides the
* look and feel (L&F) for this component.
* look and feel (L&amp;F) for this component.
*
* @param ui the <code>ScrollPaneUI</code> L&F object
* @param ui the <code>ScrollPaneUI</code> L&amp;F object
* @see #getUI
*/
public void setUI(ScrollPaneUI ui) {
......@@ -395,7 +395,7 @@ public class JScrollPane extends JComponent implements ScrollPaneConstants, Acce
/**
* Returns the suffix used to construct the name of the L&F class used to
* Returns the suffix used to construct the name of the L&amp;F class used to
* render this component.
*
* @return the string "ScrollPaneUI"
......
......@@ -108,7 +108,7 @@ public class JSeparator 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 the SeparatorUI object that renders this component
*/
......@@ -117,9 +117,9 @@ public class JSeparator 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 SeparatorUI L&F object
* @param ui the SeparatorUI L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -142,7 +142,7 @@ public class JSeparator extends JComponent implements SwingConstants, Accessible
/**
* 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 "SeparatorUI"
* @see JComponent#getUIClassID
......
......@@ -289,9 +289,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
/**
* 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 SliderUI object that implements the Slider L&F
* @return the SliderUI object that implements the Slider L&amp;F
*/
public SliderUI getUI() {
return(SliderUI)ui;
......@@ -299,9 +299,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
/**
* Sets the UI object which implements the L&F for this component.
* Sets the UI object which implements the L&amp;F for this component.
*
* @param ui the SliderUI L&F object
* @param ui the SliderUI L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -330,7 +330,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
/**
* 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 "SliderUI"
* @see JComponent#getUIClassID
......
......@@ -171,7 +171,7 @@ public class JSpinner extends JComponent implements Accessible
/**
* Returns the look and feel (L&F) object that renders this component.
* Returns the look and feel (L&amp;F) object that renders this component.
*
* @return the <code>SpinnerUI</code> object that renders this component
*/
......@@ -181,9 +181,9 @@ public class JSpinner extends JComponent implements Accessible
/**
* Sets the look and feel (L&F) object that renders this component.
* Sets the look and feel (L&amp;F) object that renders this component.
*
* @param ui the <code>SpinnerUI</code> L&F object
* @param ui the <code>SpinnerUI</code> L&amp;F object
* @see UIDefaults#getUI
*/
public void setUI(SpinnerUI ui) {
......@@ -193,7 +193,7 @@ public class JSpinner extends JComponent implements Accessible
/**
* Returns the suffix used to construct the name of the look and feel
* (L&F) class used to render this component.
* (L&amp;F) class used to render this component.
*
* @return the string "SpinnerUI"
* @see JComponent#getUIClassID
......
......@@ -359,9 +359,9 @@ public class JSplitPane extends JComponent implements Accessible
/**
* Sets the L&F object that renders this component.
* Sets the L&amp;F object that renders this component.
*
* @param ui the <code>SplitPaneUI</code> L&F object
* @param ui the <code>SplitPaneUI</code> L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -384,7 +384,7 @@ public class JSplitPane extends JComponent implements Accessible
* @return the <code>SplitPaneUI</code> object that renders this component
* @beaninfo
* expert: true
* description: The L&F object that renders this component.
* description: The L&amp;F object that renders this component.
*/
public SplitPaneUI getUI() {
return (SplitPaneUI)ui;
......@@ -392,7 +392,7 @@ public class JSplitPane extends JComponent implements Accessible
/**
* Notification from the <code>UIManager</code> that the L&F has changed.
* Notification from the <code>UIManager</code> that the L&amp;F has changed.
* Replaces the current UI object with the latest version from the
* <code>UIManager</code>.
*
......@@ -405,14 +405,14 @@ public class JSplitPane extends JComponent implements Accessible
/**
* 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 "SplitPaneUI"
* @see JComponent#getUIClassID
* @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;
......@@ -714,7 +714,7 @@ public class JSplitPane extends JComponent implements Accessible
* extra space.
*
* @param value as described above
* @exception IllegalArgumentException if <code>value</code> is < 0 or > 1
* @exception IllegalArgumentException if <code>value</code> is &lt; 0 or &gt; 1
* @since 1.3
* @beaninfo
* bound: true
......@@ -769,8 +769,8 @@ public class JSplitPane extends JComponent implements Accessible
* @param proportionalLocation a double-precision floating point value
* that specifies a percentage, from zero (top/left) to 1.0
* (bottom/right)
* @exception IllegalArgumentException if the specified location is < 0
* or > 1.0
* @exception IllegalArgumentException if the specified location is &lt; 0
* or &gt; 1.0
* @beaninfo
* description: The location of the divider.
*/
......@@ -845,7 +845,7 @@ public class JSplitPane extends JComponent implements Accessible
* location (typically a pixel count); or -1 if the UI is
* <code>null</code>
* @beaninfo
* description: The minimum location of the divider from the L&F.
* description: The minimum location of the divider from the L&amp;F.
*/
public int getMinimumDividerLocation() {
SplitPaneUI ui = getUI();
......
......@@ -1945,7 +1945,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
* Sets the table's selection mode to allow only single selections, a single
* contiguous interval, or multiple intervals.
* <P>
* <bold>Note:</bold>
* <b>Note:</b>
* <code>JTable</code> provides all the methods for handling
* column and row selection. When setting states,
* such as <code>setSelectionMode</code>, it not only
......@@ -2061,7 +2061,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
/**
* Returns true if both row and column selection models are enabled.
* Equivalent to <code>getRowSelectionAllowed() &&
* Equivalent to <code>getRowSelectionAllowed() &amp;&amp;
* getColumnSelectionAllowed()</code>.
*
* @return true if both row and column selection models are enabled
......@@ -3034,7 +3034,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
* adjusted.
* </ul>
* <p>
* <bold>Note:</bold> When a <code>JTable</code> makes adjustments
* <b>Note:</b> When a <code>JTable</code> makes adjustments
* to the widths of the columns it respects their minimum and
* maximum values absolutely. It is therefore possible that,
* even after this method is called, the total width of the columns
......@@ -3086,14 +3086,14 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
* </pre>
* where each individual delta[i] is calculated according to:
* <p>
* If (DELTA < 0) we are in shrink mode where:
* If (DELTA &lt; 0) we are in shrink mode where:
* <p>
* <PRE>
* DELTA
* delta[i] = ------------ * (pref[i] - min[i])
* (PREF - MIN)
* </PRE>
* If (DELTA > 0) we are in expand mode where:
* If (DELTA &gt; 0) we are in expand mode where:
* <p>
* <PRE>
* DELTA
......@@ -3368,7 +3368,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
* method in order to allow the renderer's tips to be used
* if it has text set.
* <p>
* <bold>Note:</bold> For <code>JTable</code> to properly display
* <b>Note:</b> For <code>JTable</code> to properly display
* tooltips of its renderers
* <code>JTable</code> must be a registered component with the
* <code>ToolTipManager</code>.
......@@ -3580,7 +3580,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
//
/**
* Returns the L&F object that renders this component.
* Returns the L&amp;F object that renders this component.
*
* @return the <code>TableUI</code> object that renders this component
*/
......@@ -3589,9 +3589,9 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
}
/**
* Sets the L&F object that renders this component and repaints.
* Sets the L&amp;F object that renders this component and repaints.
*
* @param ui the TableUI L&F object
* @param ui the TableUI L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -3607,7 +3607,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
}
/**
* Notification from the <code>UIManager</code> that the L&F has changed.
* Notification from the <code>UIManager</code> that the L&amp;F has changed.
* Replaces the current UI object with the latest version from the
* <code>UIManager</code>.
*
......@@ -3647,7 +3647,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
}
/**
* Returns the suffix used to construct the name of the L&F class used to
* Returns the suffix used to construct the name of the L&amp;F class used to
* render this component.
*
* @return the string "TableUI"
......
......@@ -155,8 +155,8 @@ public class JTextArea extends JTextComponent {
* rows and columns. A default model is created, and the initial
* string is null.
*
* @param rows the number of rows >= 0
* @param columns the number of columns >= 0
* @param rows the number of rows &gt;= 0
* @param columns the number of columns &gt;= 0
* @exception IllegalArgumentException if the rows or columns
* arguments are negative.
*/
......@@ -169,8 +169,8 @@ public class JTextArea extends JTextComponent {
* of rows and columns. A default model is created.
*
* @param text the text to be displayed, or null
* @param rows the number of rows >= 0
* @param columns the number of columns >= 0
* @param rows the number of rows &gt;= 0
* @param columns the number of columns &gt;= 0
* @exception IllegalArgumentException if the rows or columns
* arguments are negative.
*/
......@@ -195,8 +195,8 @@ public class JTextArea extends JTextComponent {
*
* @param doc the model to use, or create a default one if null
* @param text the text to be displayed, null if none
* @param rows the number of rows >= 0
* @param columns the number of columns >= 0
* @param rows the number of rows &gt;= 0
* @param columns the number of columns &gt;= 0
* @exception IllegalArgumentException if the rows or columns
* arguments are negative.
*/
......@@ -364,8 +364,8 @@ public class JTextArea extends JTextComponent {
* Translates an offset into the components text to a
* line number.
*
* @param offset the offset >= 0
* @return the line number >= 0
* @param offset the offset &gt;= 0
* @return the line number &gt;= 0
* @exception BadLocationException thrown if the offset is
* less than zero or greater than the document length.
*/
......@@ -384,7 +384,7 @@ public class JTextArea extends JTextComponent {
/**
* Determines the number of lines contained in the area.
*
* @return the number of lines > 0
* @return the number of lines &gt; 0
*/
public int getLineCount() {
Element map = getDocument().getDefaultRootElement();
......@@ -394,8 +394,8 @@ public class JTextArea extends JTextComponent {
/**
* Determines the offset of the start of the given line.
*
* @param line the line number to translate >= 0
* @return the offset >= 0
* @param line the line number to translate &gt;= 0
* @return the offset &gt;= 0
* @exception BadLocationException thrown if the line is
* less than zero or greater or equal to the number of
* lines contained in the document (as reported by
......@@ -417,8 +417,8 @@ public class JTextArea extends JTextComponent {
/**
* Determines the offset of the end of the given line.
*
* @param line the line >= 0
* @return the offset >= 0
* @param line the line &gt;= 0
* @return the offset &gt;= 0
* @exception BadLocationException Thrown if the line is
* less than zero or greater or equal to the number of
* lines contained in the document (as reported by
......@@ -446,7 +446,7 @@ public class JTextArea extends JTextComponent {
* if the model is null or if the text is null or empty.
*
* @param str the text to insert
* @param pos the position at which to insert >= 0
* @param pos the position at which to insert &gt;= 0
* @exception IllegalArgumentException if pos is an
* invalid position in the model
* @see TextComponent#setText
......@@ -486,8 +486,8 @@ public class JTextArea extends JTextComponent {
* does a delete if the new string is null or empty.
*
* @param str the text to use as the replacement
* @param start the start position >= 0
* @param end the end position >= start
* @param start the start position &gt;= 0
* @param end the end position &gt;= start
* @exception IllegalArgumentException if part of the range is an
* invalid position in the model
* @see #insert
......@@ -517,7 +517,7 @@ public class JTextArea extends JTextComponent {
/**
* Returns the number of rows in the TextArea.
*
* @return the number of rows >= 0
* @return the number of rows &gt;= 0
*/
public int getRows() {
return rows;
......@@ -527,7 +527,7 @@ public class JTextArea extends JTextComponent {
* Sets the number of rows for this TextArea. Calls invalidate() after
* setting the new value.
*
* @param rows the number of rows >= 0
* @param rows the number of rows &gt;= 0
* @exception IllegalArgumentException if rows is less than 0
* @see #getRows
* @beaninfo
......@@ -548,7 +548,7 @@ public class JTextArea extends JTextComponent {
* Defines the meaning of the height of a row. This defaults to
* the height of the font.
*
* @return the height >= 1
* @return the height &gt;= 1
*/
protected int getRowHeight() {
if (rowHeight == 0) {
......@@ -561,7 +561,7 @@ public class JTextArea extends JTextComponent {
/**
* Returns the number of columns in the TextArea.
*
* @return number of columns >= 0
* @return number of columns &gt;= 0
*/
public int getColumns() {
return columns;
......@@ -571,7 +571,7 @@ public class JTextArea extends JTextComponent {
* Sets the number of columns for this TextArea. Does an invalidate()
* after setting the new value.
*
* @param columns the number of columns >= 0
* @param columns the number of columns &gt;= 0
* @exception IllegalArgumentException if columns is less than 0
* @see #getColumns
* @beaninfo
......@@ -596,7 +596,7 @@ public class JTextArea extends JTextComponent {
* 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) {
......
......@@ -128,7 +128,7 @@ import java.io.Serializable;
&nbsp; return;
&nbsp; }
&nbsp; char[] upper = str.toCharArray();
&nbsp; for (int i = 0; i < upper.length; i++) {
&nbsp; for (int i = 0; i &lt; upper.length; i++) {
&nbsp; upper[i] = Character.toUpperCase(upper[i]);
&nbsp; }
&nbsp; super.insertString(offs, new String(upper), a);
......@@ -223,10 +223,10 @@ public class JTextField extends JTextComponent implements SwingConstants {
* <code>createDefaultModel</code> method
* @param text the initial string to display, or <code>null</code>
* @param columns the number of columns to use to calculate
* the preferred width >= 0; if <code>columns</code>
* the preferred width &gt;= 0; if <code>columns</code>
* is set to zero, the preferred width will be whatever
* naturally results from the component implementation
* @exception IllegalArgumentException if <code>columns</code> < 0
* @exception IllegalArgumentException if <code>columns</code> &lt; 0
*/
public JTextField(Document doc, String text, int columns) {
if (columns < 0) {
......
......@@ -167,9 +167,9 @@ public class JToolBar 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 <code>ToolBarUI</code> L&F object
* @param ui the <code>ToolBarUI</code> L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -182,7 +182,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
}
/**
* Notification from the <code>UIFactory</code> that the L&F has changed.
* Notification from the <code>UIFactory</code> that the L&amp;F has changed.
* Called to replace the UI with the latest version from the
* <code>UIFactory</code>.
*
......@@ -202,7 +202,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
/**
* 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 "ToolBarUI"
* @see JComponent#getUIClassID
......@@ -613,7 +613,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
}
/**
* 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 "ToolBarSeparatorUI"
* @see JComponent#getUIClassID
......
......@@ -85,7 +85,7 @@ public class JToolTip extends JComponent implements Accessible {
}
/**
* Returns the L&F object that renders this component.
* Returns the L&amp;F object that renders this component.
*
* @return the <code>ToolTipUI</code> object that renders this component
*/
......@@ -104,7 +104,7 @@ public class JToolTip extends JComponent implements Accessible {
/**
* 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 "ToolTipUI"
* @see JComponent#getUIClassID
......
......@@ -41,7 +41,7 @@ import static sun.swing.SwingUtilities2.Section.*;
/**
* <a name="jtree_description">
* <a name="jtree_description"></a>
* A control that displays a set of hierarchical data as an outline.
* You can find task-oriented documentation and examples of using trees in
* <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>,
......@@ -59,7 +59,7 @@ import static sun.swing.SwingUtilities2.Section.*;
* under a collapsed ancestor. All of a <i>viewable</i> nodes parents
* are expanded, but may or may not be displayed. A <i>displayed</i> node
* is both viewable and in the display area, where it can be seen.
* <p>
* </p>
* The following <code>JTree</code> methods use "visible" to mean "displayed":
* <ul>
* <li><code>isRootVisible()</code>
......@@ -69,14 +69,12 @@ import static sun.swing.SwingUtilities2.Section.*;
* <li><code>getVisibleRowCount()</code>
* <li><code>setVisibleRowCount()</code>
* </ul>
* <p>
* The next group of <code>JTree</code> methods use "visible" to mean
* "viewable" (under an expanded parent):
* <ul>
* <li><code>isVisible()</code>
* <li><code>makeVisible()</code>
* </ul>
* <p>
* If you are interested in knowing when the selection changes implement
* the <code>TreeSelectionListener</code> interface and add the instance
* using the method <code>addTreeSelectionListener</code>.
......@@ -87,6 +85,7 @@ import static sun.swing.SwingUtilities2.Section.*;
* If you are interested in detecting either double-click events or when
* a user clicks on a node, regardless of whether or not it was selected,
* we recommend you do the following:
* </p>
* <pre>
* final JTree tree = ...;
*
......@@ -114,12 +113,13 @@ import static sun.swing.SwingUtilities2.Section.*;
* a graphic icon and text), subclass {@link TreeCellRenderer} and use
* {@link #setCellRenderer} to tell the tree to use it. To edit such nodes,
* subclass {@link TreeCellEditor} and use {@link #setCellEditor}.
* </p>
* <p>
* Like all <code>JComponent</code> classes, you can use {@link InputMap} and
* {@link ActionMap}
* to associate an {@link Action} object with a {@link KeyStroke}
* and execute the action under specified conditions.
* <p>
* </p>
* <strong>Warning:</strong> Swing is not thread safe. For more
* information see <a
* href="package-summary.html#threading">Swing's Threading
......@@ -133,7 +133,7 @@ import static sun.swing.SwingUtilities2.Section.*;
* of all JavaBeans<sup><font size="-2">TM</font></sup>
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*
*</p>
* @beaninfo
* attribute: isContainer false
* description: A component that displays a set of hierarchical data as an outline.
......@@ -174,7 +174,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
transient protected TreeCellRenderer cellRenderer;
/**
* Height to use for each display row. If this is <= 0 the renderer
* Height to use for each display row. If this is &lt;= 0 the renderer
* determines the height for each row.
*/
protected int rowHeight;
......@@ -671,7 +671,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
/**
* Returns the L&F object that renders this component.
* Returns the L&amp;F object that renders this component.
*
* @return the <code>TreeUI</code> object that renders this component
*/
......@@ -680,11 +680,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
/**
* Sets the L&F object that renders this component.
* Sets the L&amp;F object that renders this component.
* <p>
* This is a bound property.
*
* @param ui the <code>TreeUI</code> L&F object
* @param ui the <code>TreeUI</code> L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -706,7 +706,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
/**
* Notification from the <code>UIManager</code> that the L&F has changed.
* Notification from the <code>UIManager</code> that the L&amp;F has changed.
* Replaces the current UI object with the latest version from the
* <code>UIManager</code>.
*
......@@ -721,7 +721,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* 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 "TreeUI"
* @see JComponent#getUIClassID
......@@ -1701,7 +1701,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Selects the nodes corresponding to each of the specified rows
* in the display. If a particular element of <code>rows</code> is
* < 0 or >= <code>getRowCount</code>, it will be ignored.
* &lt; 0 or &gt;= <code>getRowCount</code>, it will be ignored.
* If none of the elements
* in <code>rows</code> are valid rows, the selection will
* be cleared. That is it will be as if <code>clearSelection</code>
......@@ -2162,8 +2162,8 @@ public class JTree extends JComponent implements Scrollable, Accessible
*
* @param row an integer specifying a row
* @return the <code>TreePath</code> to the specified node,
* <code>null</code> if <code>row < 0</code>
* or <code>row >= getRowCount()</code>
* <code>null</code> if <code>row &lt; 0</code>
* or <code>row &gt;= getRowCount()</code>
*/
public TreePath getPathForRow(int row) {
TreeUI tree = getUI();
......@@ -2211,7 +2211,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
* Ensures that the node in the specified row is expanded and
* viewable.
* <p>
* If <code>row</code> is < 0 or >= <code>getRowCount</code> this
* If <code>row</code> is &lt; 0 or &gt;= <code>getRowCount</code> this
* will have no effect.
*
* @param row an integer specifying a display row, where 0 is the
......@@ -2234,7 +2234,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Ensures that the node in the specified row is collapsed.
* <p>
* If <code>row</code> is < 0 or >= <code>getRowCount</code> this
* If <code>row</code> is &lt; 0 or &gt;= <code>getRowCount</code> this
* will have no effect.
*
* @param row an integer specifying a display row, where 0 is the
......
......@@ -285,7 +285,7 @@ public class JViewport extends JComponent implements Accessible
/**
* Returns the L&F object that renders this component.
* Returns the L&amp;F object that renders this component.
*
* @return a <code>ViewportUI</code> object
* @since 1.3
......@@ -296,9 +296,9 @@ public class JViewport extends JComponent implements Accessible
/**
* Sets the L&F object that renders this component.
* Sets the L&amp;F object that renders this component.
*
* @param ui the <code>ViewportUI</code> L&F object
* @param ui the <code>ViewportUI</code> L&amp;F object
* @see UIDefaults#getUI
* @beaninfo
* bound: true
......@@ -323,7 +323,7 @@ public class JViewport 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 "ViewportUI"
......
......@@ -284,11 +284,11 @@ public class KeyStroke extends AWTKeyStroke {
* If typed, pressed or released is not specified, pressed is assumed. Here
* are some examples:
* <pre>
* "INSERT" => getKeyStroke(KeyEvent.VK_INSERT, 0);
* "control DELETE" => getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
* "alt shift X" => getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
* "alt shift released X" => getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
* "typed a" => getKeyStroke('a');
* "INSERT" =&gt; getKeyStroke(KeyEvent.VK_INSERT, 0);
* "control DELETE" =&gt; getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
* "alt shift X" =&gt; getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
* "alt shift released X" =&gt; getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
* "typed a" =&gt; getKeyStroke('a');
* </pre>
*
* In order to maintain backward-compatibility, specifying a null String,
......
......@@ -190,7 +190,7 @@ public class OverlayLayout implements LayoutManager2,Serializable {
* Returns the alignment along the x axis for the container.
*
* @param target the container
* @return the alignment >= 0.0f && <= 1.0f
* @return the alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f
*/
public float getLayoutAlignmentX(Container target) {
checkContainer(target);
......@@ -202,7 +202,7 @@ public class OverlayLayout implements LayoutManager2,Serializable {
* Returns the alignment along the y axis for the container.
*
* @param target the container
* @return the alignment >= 0.0f && <= 1.0f
* @return the alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f
*/
public float getLayoutAlignmentY(Container target) {
checkContainer(target);
......
......@@ -251,7 +251,7 @@ public class ProgressMonitor implements Accessible
/**
* Indicate the progress of the operation being monitored.
* If the specified value is >= the maximum, the progress
* If the specified value is &gt;= the maximum, the progress
* monitor is closed.
* @param nv an int specifying the current value, between the
* maximum and minimum specified for this component
......@@ -302,7 +302,7 @@ public class ProgressMonitor implements Accessible
/**
* Indicate that the operation is complete. This happens automatically
* when the value set by setProgress is >= max, but it may be called
* when the value set by setProgress is &gt;= max, but it may be called
* earlier if the operation ends early.
*/
public void close() {
......
......@@ -142,10 +142,10 @@ public class SizeRequirements implements Serializable {
* Creates a SizeRequirements object with the specified minimum, preferred,
* and maximum sizes and the specified alignment.
*
* @param min the minimum size >= 0
* @param pref the preferred size >= 0
* @param max the maximum size >= 0
* @param a the alignment >= 0.0f && <= 1.0f
* @param min the minimum size &gt;= 0
* @param pref the preferred size &gt;= 0
* @param max the maximum size &gt;= 0
* @param a the alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f
*/
public SizeRequirements(int min, int pref, int max, float a) {
minimum = min;
......@@ -246,7 +246,7 @@ public class SizeRequirements implements Serializable {
* by invoking the getTiledSizeRequirements method. The components
* will be tiled in the forward direction with offsets increasing from 0.
*
* @param allocated the total span to be allocated >= 0.
* @param allocated the total span to be allocated &gt;= 0.
* @param total the total of the children requests. This argument
* is optional and may be null.
* @param children the size requirements for each component.
......@@ -282,7 +282,7 @@ public class SizeRequirements implements Serializable {
* reverse direction represents components tiled from right to left
* or bottom to top.
*
* @param allocated the total span to be allocated >= 0.
* @param allocated the total span to be allocated &gt;= 0.
* @param total the total of the children requests. This argument
* is optional and may be null.
* @param children the size requirements for each component.
......@@ -405,7 +405,7 @@ public class SizeRequirements implements Serializable {
* Normal alignment will be done with an alignment value of 0.0f
* representing the left/top edge of a component.
*
* @param allocated the total span to be allocated >= 0.
* @param allocated the total span to be allocated &gt;= 0.
* @param total the total of the children requests.
* @param children the size requirements for each component.
* @param offsets the offset from 0 for each child where
......@@ -441,7 +441,7 @@ public class SizeRequirements implements Serializable {
* to be aligned. With reverse alignment, 0.0f represents the
* right/bottom edge.
*
* @param allocated the total span to be allocated >= 0.
* @param allocated the total span to be allocated &gt;= 0.
* @param total the total of the children requests.
* @param children the size requirements for each component.
* @param offsets the offset from 0 for each child where
......
......@@ -78,7 +78,7 @@ package javax.swing;
*
* <p>
*
* <h4>Implementation Notes</h4>
* <h3>Implementation Notes</h3>
*
* Normally when storing the size and position of entries,
* one would choose between
......@@ -145,7 +145,7 @@ public class SizeSequence {
*
* @param numEntries the number of sizes to track
* @exception NegativeArraySizeException if
* <code>numEntries < 0</code>
* <code>numEntries &lt; 0</code>
*/
public SizeSequence(int numEntries) {
this(numEntries, 0);
......@@ -306,7 +306,7 @@ public class SizeSequence {
/**
* Returns the size of the specified entry.
* If <code>index</code> is out of the range
* <code>(0 <= index < getSizes().length)</code>
* <code>(0 &lt;= index &lt; getSizes().length)</code>
* the behavior is unspecified.
*
* @param index the index corresponding to the entry
......@@ -320,7 +320,7 @@ public class SizeSequence {
* Sets the size of the specified entry.
* Note that if the value of <code>index</code>
* does not fall in the range:
* <code>(0 <= index < getSizes().length)</code>
* <code>(0 &lt;= index &lt; getSizes().length)</code>
* the behavior is unspecified.
*
* @param index the index corresponding to the entry
......@@ -348,8 +348,8 @@ public class SizeSequence {
* Adds a contiguous group of entries to this <code>SizeSequence</code>.
* Note that the values of <code>start</code> and
* <code>length</code> must satisfy the following
* conditions: <code>(0 <= start < getSizes().length)
* AND (length >= 0)</code>. If these conditions are
* conditions: <code>(0 &lt;= start &lt; getSizes().length)
* AND (length &gt;= 0)</code>. If these conditions are
* not met, the behavior is unspecified and an exception
* may be thrown.
*
......@@ -359,7 +359,7 @@ public class SizeSequence {
* @param value the size to be assigned to each new entry
* @exception ArrayIndexOutOfBoundsException if the parameters
* are outside of the range:
* (<code>0 <= start < (getSizes().length)) AND (length >= 0)</code>
* (<code>0 &lt;= start &lt; (getSizes().length)) AND (length &gt;= 0)</code>
*/
public void insertEntries(int start, int length, int value) {
int sizes[] = getSizes();
......@@ -383,8 +383,8 @@ public class SizeSequence {
* from this <code>SizeSequence</code>.
* Note that the values of <code>start</code> and
* <code>length</code> must satisfy the following
* conditions: <code>(0 <= start < getSizes().length)
* AND (length >= 0)</code>. If these conditions are
* conditions: <code>(0 &lt;= start &lt; getSizes().length)
* AND (length &gt;= 0)</code>. If these conditions are
* not met, the behavior is unspecified and an exception
* may be thrown.
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册