< prev index next >
src/java.desktop/share/classes/java/awt/List.java
Print this page
@@ -34,11 +34,11 @@
import java.io.IOException;
import javax.accessibility.*;
/**
- * The <code>List</code> component presents the user with a
+ * The {@code List} component presents the user with a
* scrolling list of text items. The list can be set up so that
* the user can choose either one item or multiple items.
* <p>
* For example, the code . . .
*
@@ -55,46 +55,46 @@
* lst.add("Neptune");
* lst.add("Pluto");
* cnt.add(lst);
* </pre></blockquote><hr>
* <p>
- * where <code>cnt</code> is a container, produces the following
+ * where {@code cnt} is a container, produces the following
* scrolling list:
* <p>
* <img src="doc-files/List-1.gif"
* alt="Shows a list containing: Venus, Earth, JavaSoft, and Mars. Javasoft is selected." style="float:center; margin: 7px 10px;">
* <p>
* If the List allows multiple selections, then clicking on
* an item that is already selected deselects it. In the preceding
* example, only one item from the scrolling list can be selected
* at a time, since the second argument when creating the new scrolling
- * list is <code>false</code>. If the List does not allow multiple
+ * list is {@code false}. If the List does not allow multiple
* selections, selecting an item causes any other selected item
* to be deselected.
* <p>
* Note that the list in the example shown was created with four visible
* rows. Once the list has been created, the number of visible rows
- * cannot be changed. A default <code>List</code> is created with
- * four rows, so that <code>lst = new List()</code> is equivalent to
- * <code>list = new List(4, false)</code>.
+ * cannot be changed. A default {@code List} is created with
+ * four rows, so that {@code lst = new List()} is equivalent to
+ * {@code list = new List(4, false)}.
* <p>
* Beginning with Java 1.1, the Abstract Window Toolkit
- * sends the <code>List</code> object all mouse, keyboard, and focus events
+ * sends the {@code List} object all mouse, keyboard, and focus events
* that occur over it. (The old AWT event model is being maintained
* only for backwards compatibility, and its use is discouraged.)
* <p>
* When an item is selected or deselected by the user, AWT sends an instance
- * of <code>ItemEvent</code> to the list.
+ * of {@code ItemEvent} to the list.
* When the user double-clicks on an item in a scrolling list,
- * AWT sends an instance of <code>ActionEvent</code> to the
+ * AWT sends an instance of {@code ActionEvent} to the
* list following the item event. AWT also generates an action event
* when the user presses the return key while an item in the
* list is selected.
* <p>
* If an application wants to perform some action based on an item
* in this list being selected or activated by the user, it should implement
- * <code>ItemListener</code> or <code>ActionListener</code>
+ * {@code ItemListener} or {@code ActionListener}
* as appropriate and register the new listener to receive
* events from this list.
* <p>
* For multiple-selection scrolling lists, it is considered a better
* user interface to use an external gesture (such as clicking on a
@@ -117,25 +117,25 @@
*/
Vector<String> items = new Vector<>();
/**
* This field will represent the number of visible rows in the
- * <code>List</code> Component. It is specified only once, and
+ * {@code List} Component. It is specified only once, and
* that is when the list component is actually
* created. It will never change.
*
* @serial
* @see #getRows()
*/
int rows = 0;
/**
- * <code>multipleMode</code> is a variable that will
- * be set to <code>true</code> if a list component is to be set to
+ * {@code multipleMode} is a variable that will
+ * be set to {@code true} if a list component is to be set to
* multiple selection mode, that is where the user can
* select more than one item in a list at one time.
- * <code>multipleMode</code> will be set to false if the
+ * {@code multipleMode} will be set to false if the
* list component is set to single selection, that is where
* the user can only select one item on the list at any
* one time.
*
* @serial
@@ -143,11 +143,11 @@
* @see #setMultipleMode(boolean)
*/
boolean multipleMode = false;
/**
- * <code>selected</code> is an array that will contain
+ * {@code selected} is an array that will contain
* the indices of items that have been selected.
*
* @serial
* @see #getSelectedIndexes()
* @see #getSelectedIndex()
@@ -176,11 +176,11 @@
/**
* Creates a new scrolling list.
* By default, there are four visible lines and multiple selections are
* not allowed. Note that this is a convenience method for
- * <code>List(0, false)</code>. Also note that the number of visible
+ * {@code List(0, false)}. Also note that the number of visible
* lines in the list cannot be changed after it has been created.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true.
* @see java.awt.GraphicsEnvironment#isHeadless
*/
@@ -190,11 +190,11 @@
/**
* Creates a new scrolling list initialized with the specified
* number of visible lines. By default, multiple selections are
* not allowed. Note that this is a convenience method for
- * <code>List(rows, false)</code>. Also note that the number
+ * {@code List(rows, false)}. Also note that the number
* of visible rows in the list cannot be changed after it has
* been created.
* @param rows the number of items to show.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true.
@@ -215,16 +215,16 @@
* Creates a new scrolling list initialized to display the specified
* number of rows. Note that if zero rows are specified, then
* the list will be created with a default of four rows.
* Also note that the number of visible rows in the list cannot
* be changed after it has been created.
- * If the value of <code>multipleMode</code> is
- * <code>true</code>, then the user can select multiple items from
- * the list. If it is <code>false</code>, only one item at a time
+ * If the value of {@code multipleMode} is
+ * {@code true}, then the user can select multiple items from
+ * the list. If it is {@code false}, only one item at a time
* can be selected.
* @param rows the number of items to show.
- * @param multipleMode if <code>true</code>,
+ * @param multipleMode if {@code true},
* then multiple selections are allowed;
* otherwise, only one item can be selected at a time.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true.
* @see java.awt.GraphicsEnvironment#isHeadless
@@ -235,11 +235,11 @@
this.multipleMode = multipleMode;
}
/**
* Construct a name for this component. Called by
- * <code>getName</code> when the name is <code>null</code>.
+ * {@code getName} when the name is {@code null}.
*/
String constructComponentName() {
synchronized (List.class) {
return base + nameCounter++;
}
@@ -284,11 +284,11 @@
/**
* Returns the number of items in the list.
*
* @return the number of items in the list
* @deprecated As of JDK version 1.1,
- * replaced by <code>getItemCount()</code>.
+ * replaced by {@code getItemCount()}.
*/
@Deprecated
public int countItems() {
return items.size();
}
@@ -337,11 +337,11 @@
/**
* Adds the specified item to the end of the list.
*
* @param item the item to be added
- * @deprecated replaced by <code>add(String)</code>.
+ * @deprecated replaced by {@code add(String)}.
*/
@Deprecated
public void addItem(String item) {
addItem(item, -1);
}
@@ -352,12 +352,12 @@
* zero-based. If the value of the index is less than zero,
* or if the value of the index is greater than or equal to
* the number of items in the list, then the item is added
* to the end of the list.
* @param item the item to be added;
- * if this parameter is <code>null</code> then the item is
- * treated as an empty string, <code>""</code>
+ * if this parameter is {@code null} then the item is
+ * treated as an empty string, {@code ""}
* @param index the position at which to add the item
* @since 1.1
*/
public void add(String item, int index) {
addItem(item, index);
@@ -367,11 +367,11 @@
* Adds the specified item to the list
* at the position indicated by the index.
*
* @param item the item to be added
* @param index the position at which to add the item
- * @deprecated replaced by <code>add(String, int)</code>.
+ * @deprecated replaced by {@code add(String, int)}.
*/
@Deprecated
public synchronized void addItem(String item, int index) {
if (index < -1 || index >= items.size()) {
index = -1;
@@ -396,11 +396,11 @@
/**
* Replaces the item at the specified index in the scrolling list
* with the new string.
* @param newValue a new string to replace an existing item
* @param index the position of the item to replace
- * @exception ArrayIndexOutOfBoundsException if <code>index</code>
+ * @exception ArrayIndexOutOfBoundsException if {@code index}
* is out of range
*/
public synchronized void replaceItem(String newValue, int index) {
remove(index);
add(newValue, index);
@@ -416,11 +416,11 @@
clear();
}
/**
* @deprecated As of JDK version 1.1,
- * replaced by <code>removeAll()</code>.
+ * replaced by {@code removeAll()}.
*/
@Deprecated
public synchronized void clear() {
ListPeer peer = (ListPeer)this.peer;
if (peer != null) {
@@ -456,23 +456,23 @@
* only selected item in the list, the list is set to have no selection.
* @param position the index of the item to delete
* @see #add(String, int)
* @since 1.1
* @exception ArrayIndexOutOfBoundsException
- * if the <code>position</code> is less than 0 or
- * greater than <code>getItemCount()-1</code>
+ * if the {@code position} is less than 0 or
+ * greater than {@code getItemCount()-1}
*/
public void remove(int position) {
delItem(position);
}
/**
* Removes the item at the specified position.
*
* @param position the index of the item to delete
- * @deprecated replaced by <code>remove(String)</code>
- * and <code>remove(int)</code>.
+ * @deprecated replaced by {@code remove(String)}
+ * and {@code remove(int)}.
*/
@Deprecated
public void delItem(int position) {
delItems(position, position);
}
@@ -480,11 +480,11 @@
/**
* Gets the index of the selected item on the list,
*
* @return the index of the selected item;
* if no item is selected, or if multiple items are
- * selected, <code>-1</code> is returned.
+ * selected, {@code -1} is returned.
* @see #select
* @see #deselect
* @see #isIndexSelected
*/
public synchronized int getSelectedIndex() {
@@ -512,11 +512,11 @@
/**
* Gets the selected item on this scrolling list.
*
* @return the selected item on the list;
* if no item is selected, or if multiple items are
- * selected, <code>null</code> is returned.
+ * selected, {@code null} is returned.
* @see #select
* @see #deselect
* @see #isIndexSelected
*/
public synchronized String getSelectedItem() {
@@ -542,11 +542,11 @@
return str;
}
/**
* Gets the selected items on this scrolling list in an array of Objects.
- * @return an array of <code>Object</code>s representing the
+ * @return an array of {@code Object}s representing the
* selected items on this scrolling list;
* if no item is selected, a zero-length array is returned.
* @see #getSelectedItems
* @see ItemSelectable
*/
@@ -561,12 +561,12 @@
* and will result in unspecified behavior.
*
* <p>Note that this method should be primarily used to
* initially select an item in this component.
* Programmatically calling this method will <i>not</i> trigger
- * an <code>ItemEvent</code>. The only way to trigger an
- * <code>ItemEvent</code> is by user interaction.
+ * an {@code ItemEvent}. The only way to trigger an
+ * {@code ItemEvent} is by user interaction.
*
* @param index the position of the item to select
* @see #getSelectedItem
* @see #deselect
* @see #isIndexSelected
@@ -647,12 +647,12 @@
/**
* Determines if the specified item in this scrolling list is
* selected.
* @param index the item to be checked
- * @return <code>true</code> if the specified item has been
- * selected; <code>false</code> otherwise
+ * @return {@code true} if the specified item has been
+ * selected; {@code false} otherwise
* @see #select
* @see #deselect
* @since 1.1
*/
public boolean isIndexSelected(int index) {
@@ -663,11 +663,11 @@
* Determines if the specified item in the list is selected.
*
* @param index specifies the item to be checked
* @return {@code true} if the item is selected; otherwise {@code false}
* @deprecated As of JDK version 1.1,
- * replaced by <code>isIndexSelected(int)</code>.
+ * replaced by {@code isIndexSelected(int)}.
*/
@Deprecated
public boolean isSelected(int index) {
int sel[] = getSelectedIndexes();
for (int i = 0 ; i < sel.length ; i++) {
@@ -678,23 +678,23 @@
return false;
}
/**
* Gets the number of visible lines in this list. Note that
- * once the <code>List</code> has been created, this number
+ * once the {@code List} has been created, this number
* will never change.
* @return the number of visible lines in this scrolling list
*/
public int getRows() {
return rows;
}
/**
* Determines whether this list allows multiple selections.
*
- * @return <code>true</code> if this list allows multiple
- * selections; otherwise, <code>false</code>
+ * @return {@code true} if this list allows multiple
+ * selections; otherwise, {@code false}
* @see #setMultipleMode
* @since 1.1
*/
public boolean isMultipleMode() {
return allowsMultipleSelections();
@@ -704,11 +704,11 @@
* Determines whether this list allows multiple selections.
*
* @return {@code true} if this list allows multiple
* selections; otherwise {@code false}
* @deprecated As of JDK version 1.1,
- * replaced by <code>isMultipleMode()</code>.
+ * replaced by {@code isMultipleMode()}.
*/
@Deprecated
public boolean allowsMultipleSelections() {
return multipleMode;
}
@@ -719,11 +719,11 @@
* When the selection mode is changed from multiple-selection to
* single-selection, the selected items change as follows:
* If a selected item has the location cursor, only that
* item will remain selected. If no selected item has the
* location cursor, all items will be deselected.
- * @param b if <code>true</code> then multiple selections
+ * @param b if {@code true} then multiple selections
* are allowed; otherwise, only one item from
* the list can be selected at once
* @see #isMultipleMode
* @since 1.1
*/
@@ -734,11 +734,11 @@
/**
* Enables or disables multiple selection mode for this list.
*
* @param b {@code true} to enable multiple mode, {@code false} otherwise
* @deprecated As of JDK version 1.1,
- * replaced by <code>setMultipleMode(boolean)</code>.
+ * replaced by {@code setMultipleMode(boolean)}.
*/
@Deprecated
public synchronized void setMultipleSelections(boolean b) {
if (b != multipleMode) {
multipleMode = b;
@@ -749,11 +749,11 @@
}
}
/**
* Gets the index of the item that was last made visible by
- * the method <code>makeVisible</code>.
+ * the method {@code makeVisible}.
* @return the index of the item that was last made visible
* @see #makeVisible
*/
public int getVisibleIndex() {
return visibleIndex;
@@ -790,11 +790,11 @@
* assuming it has the specified number of rows.
*
* @param rows the number of rows
* @return the preferred dimensions for displaying this list
* @deprecated As of JDK version 1.1,
- * replaced by <code>getPreferredSize(int)</code>.
+ * replaced by {@code getPreferredSize(int)}.
*/
@Deprecated
public Dimension preferredSize(int rows) {
synchronized (getTreeLock()) {
ListPeer peer = (ListPeer)this.peer;
@@ -814,11 +814,11 @@
return preferredSize();
}
/**
* @deprecated As of JDK version 1.1,
- * replaced by <code>getPreferredSize()</code>.
+ * replaced by {@code getPreferredSize()}.
*/
@Deprecated
public Dimension preferredSize() {
synchronized (getTreeLock()) {
return (rows > 0) ?
@@ -845,11 +845,11 @@
* with the specified number of rows.
*
* @param rows the number of rows in the list
* @return the minimum dimensions for displaying this list
* @deprecated As of JDK version 1.1,
- * replaced by <code>getMinimumSize(int)</code>.
+ * replaced by {@code getMinimumSize(int)}.
*/
@Deprecated
public Dimension minimumSize(int rows) {
synchronized (getTreeLock()) {
ListPeer peer = (ListPeer)this.peer;
@@ -870,11 +870,11 @@
return minimumSize();
}
/**
* @deprecated As of JDK version 1.1,
- * replaced by <code>getMinimumSize()</code>.
+ * replaced by {@code getMinimumSize()}.
*/
@Deprecated
public Dimension minimumSize() {
synchronized (getTreeLock()) {
return (rows > 0) ? minimumSize(rows) : super.minimumSize();
@@ -882,12 +882,12 @@
}
/**
* Adds the specified item listener to receive item events from
* this list. Item events are sent in response to user input, but not
- * in response to calls to <code>select</code> or <code>deselect</code>.
- * If listener <code>l</code> is <code>null</code>,
+ * in response to calls to {@code select} or {@code deselect}.
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the item listener
@@ -908,11 +908,11 @@
}
/**
* Removes the specified item listener so that it no longer
* receives item events from this list.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the item listener
@@ -931,11 +931,11 @@
/**
* Returns an array of all the item listeners
* registered on this list.
*
- * @return all of this list's <code>ItemListener</code>s
+ * @return all of this list's {@code ItemListener}s
* or an empty array if no item
* listeners are currently registered
*
* @see #addItemListener
* @see #removeItemListener
@@ -951,11 +951,11 @@
* Adds the specified action listener to receive action events from
* this list. Action events occur when a user double-clicks
* on a list item or types Enter when the list has the keyboard
* focus.
* <p>
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the action listener
@@ -975,11 +975,11 @@
/**
* Removes the specified action listener so that it no longer
* receives action events from this list. Action events
* occur when a user double-clicks on a list item.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the action listener
@@ -998,11 +998,11 @@
/**
* Returns an array of all the action listeners
* registered on this list.
*
- * @return all of this list's <code>ActionListener</code>s
+ * @return all of this list's {@code ActionListener}s
* or an empty array if no action
* listeners are currently registered
*
* @see #addActionListener
* @see #removeActionListener
@@ -1015,36 +1015,36 @@
}
/**
* Returns an array of all the objects currently registered
* as <code><em>Foo</em>Listener</code>s
- * upon this <code>List</code>.
+ * upon this {@code List}.
* <code><em>Foo</em>Listener</code>s are registered using the
* <code>add<em>Foo</em>Listener</code> method.
*
* <p>
- * You can specify the <code>listenerType</code> argument
+ * You can specify the {@code listenerType} argument
* with a class literal, such as
* <code><em>Foo</em>Listener.class</code>.
* For example, you can query a
- * <code>List</code> <code>l</code>
+ * {@code List l}
* for its item listeners with the following code:
*
* <pre>ItemListener[] ils = (ItemListener[])(l.getListeners(ItemListener.class));</pre>
*
* If no such listeners exist, this method returns an empty array.
*
* @param listenerType the type of listeners requested; this parameter
* should specify an interface that descends from
- * <code>java.util.EventListener</code>
+ * {@code java.util.EventListener}
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s on this list,
* or an empty array if no such
* listeners have been added
- * @exception ClassCastException if <code>listenerType</code>
+ * @exception ClassCastException if {@code listenerType}
* doesn't specify a class or interface that implements
- * <code>java.util.EventListener</code>
+ * {@code java.util.EventListener}
*
* @see #getItemListeners
* @since 1.3
*/
public <T extends EventListener> T[] getListeners(Class<T> listenerType) {
@@ -1080,17 +1080,17 @@
return super.eventEnabled(e);
}
/**
* Processes events on this scrolling list. If an event is
- * an instance of <code>ItemEvent</code>, it invokes the
- * <code>processItemEvent</code> method. Else, if the
- * event is an instance of <code>ActionEvent</code>,
- * it invokes <code>processActionEvent</code>.
+ * an instance of {@code ItemEvent}, it invokes the
+ * {@code processItemEvent} method. Else, if the
+ * event is an instance of {@code ActionEvent},
+ * it invokes {@code processActionEvent}.
* If the event is not an item event or an action event,
- * it invokes <code>processEvent</code> on the superclass.
- * <p>Note that if the event parameter is <code>null</code>
+ * it invokes {@code processEvent} on the superclass.
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the event
* @see java.awt.event.ActionEvent
@@ -1111,21 +1111,21 @@
}
/**
* Processes item events occurring on this list by
* dispatching them to any registered
- * <code>ItemListener</code> objects.
+ * {@code ItemListener} objects.
* <p>
* This method is not called unless item events are
* enabled for this component. Item events are enabled
* when one of the following occurs:
* <ul>
- * <li>An <code>ItemListener</code> object is registered
- * via <code>addItemListener</code>.
- * <li>Item events are enabled via <code>enableEvents</code>.
+ * <li>An {@code ItemListener} object is registered
+ * via {@code addItemListener}.
+ * <li>Item events are enabled via {@code enableEvents}.
* </ul>
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the item event
* @see java.awt.event.ItemEvent
@@ -1142,21 +1142,21 @@
}
/**
* Processes action events occurring on this component
* by dispatching them to any registered
- * <code>ActionListener</code> objects.
+ * {@code ActionListener} objects.
* <p>
* This method is not called unless action events are
* enabled for this component. Action events are enabled
* when one of the following occurs:
* <ul>
- * <li>An <code>ActionListener</code> object is registered
- * via <code>addActionListener</code>.
- * <li>Action events are enabled via <code>enableEvents</code>.
+ * <li>An {@code ActionListener} object is registered
+ * via {@code addActionListener}.
+ * <li>Action events are enabled via {@code enableEvents}.
* </ul>
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the action event
* @see java.awt.event.ActionEvent
@@ -1207,35 +1207,35 @@
* field isn't necessarily up to date, we sync it up with the
* peer before serializing.
*/
/**
- * The <code>List</code> component's
+ * The {@code List} component's
* Serialized Data Version.
*
* @serial
*/
private int listSerializedDataVersion = 1;
/**
* Writes default serializable fields to stream. Writes
- * a list of serializable <code>ItemListeners</code>
- * and <code>ActionListeners</code> as optional data.
+ * a list of serializable {@code ItemListeners}
+ * and {@code ActionListeners} as optional data.
* The non-serializable listeners are detected and
* no attempt is made to serialize them.
*
- * @serialData <code>null</code> terminated sequence of 0
- * or more pairs; the pair consists of a <code>String</code>
- * and an <code>Object</code>; the <code>String</code>
+ * @serialData {@code null} terminated sequence of 0
+ * or more pairs; the pair consists of a {@code String}
+ * and an {@code Object}; the {@code String}
* indicates the type of object and is one of the
* following:
- * <code>itemListenerK</code> indicating an
- * <code>ItemListener</code> object;
- * <code>actionListenerK</code> indicating an
- * <code>ActionListener</code> object
+ * {@code itemListenerK} indicating an
+ * {@code ItemListener} object;
+ * {@code actionListenerK} indicating an
+ * {@code ActionListener} object
*
- * @param s the <code>ObjectOutputStream</code> to write
+ * @param s the {@code ObjectOutputStream} to write
* @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
* @see java.awt.Component#itemListenerK
* @see java.awt.Component#actionListenerK
* @see #readObject(ObjectInputStream)
*/
@@ -1254,21 +1254,21 @@
AWTEventMulticaster.save(s, actionListenerK, actionListener);
s.writeObject(null);
}
/**
- * Reads the <code>ObjectInputStream</code> and if it
- * isn't <code>null</code> adds a listener to receive
+ * Reads the {@code ObjectInputStream} and if it
+ * isn't {@code null} adds a listener to receive
* both item events and action events (as specified
* by the key stored in the stream) fired by the
- * <code>List</code>.
+ * {@code List}.
* Unrecognized keys or values will be ignored.
*
- * @param s the <code>ObjectInputStream</code> to write
+ * @param s the {@code ObjectInputStream} to write
* @exception HeadlessException if
- * <code>GraphicsEnvironment.isHeadless</code> returns
- * <code>true</code>
+ * {@code GraphicsEnvironment.isHeadless} returns
+ * {@code true}
* @see #removeItemListener(ItemListener)
* @see #addItemListener(ItemListener)
* @see java.awt.GraphicsEnvironment#isHeadless
* @see #writeObject(ObjectOutputStream)
*/
@@ -1298,17 +1298,17 @@
// Accessibility support
////////////////
/**
- * Gets the <code>AccessibleContext</code> associated with this
- * <code>List</code>. For lists, the <code>AccessibleContext</code>
- * takes the form of an <code>AccessibleAWTList</code>.
- * A new <code>AccessibleAWTList</code> instance is created, if necessary.
+ * Gets the {@code AccessibleContext} associated with this
+ * {@code List}. For lists, the {@code AccessibleContext}
+ * takes the form of an {@code AccessibleAWTList}.
+ * A new {@code AccessibleAWTList} instance is created, if necessary.
*
- * @return an <code>AccessibleAWTList</code> that serves as the
- * <code>AccessibleContext</code> of this <code>List</code>
+ * @return an {@code AccessibleAWTList} that serves as the
+ * {@code AccessibleContext} of this {@code List}
* @since 1.3
*/
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleAWTList();
@@ -1316,11 +1316,11 @@
return accessibleContext;
}
/**
* This class implements accessibility support for the
- * <code>List</code> class. It provides an implementation of the
+ * {@code List} class. It provides an implementation of the
* Java Accessibility API appropriate to list user-interface elements.
* @since 1.3
*/
protected class AccessibleAWTList extends AccessibleAWTComponent
implements AccessibleSelection, ItemListener, ActionListener
@@ -1928,27 +1928,27 @@
public void setSize(Dimension d) {
// not supported; no-op
}
/**
- * Returns the <code>Accessible</code> child, if one exists,
- * contained at the local coordinate <code>Point</code>.
+ * Returns the {@code Accessible} child, if one exists,
+ * contained at the local coordinate {@code Point}.
*
* @param p the point relative to the coordinate system of this
* object
- * @return the <code>Accessible</code>, if it exists,
- * at the specified location; otherwise <code>null</code>
+ * @return the {@code Accessible}, if it exists,
+ * at the specified location; otherwise {@code null}
*/
public Accessible getAccessibleAt(Point p) {
return null; // object cannot have children!
}
/**
* Returns whether this object can accept focus or not. Objects
* that can accept focus will also have the
- * <code>AccessibleState.FOCUSABLE</code> state set in their
- * <code>AccessibleStateSet</code>.
+ * {@code AccessibleState.FOCUSABLE} state set in their
+ * {@code AccessibleStateSet}.
*
* @return true if object can accept focus; otherwise false
* @see AccessibleContext#getAccessibleStateSet
* @see AccessibleState#FOCUSABLE
* @see AccessibleState#FOCUSED
< prev index next >