--- a/jdk/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java Mon Jan 11 06:10:32 2016 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java Mon Jan 11 17:51:54 2016 +0300
@@ -40,20 +40,20 @@
* "on" to "off" or from "off" to "on."
* <p>
* The following picture depicts a menu which contains an instance
- * of <code>CheckBoxMenuItem</code>:
+ * of {@code CheckBoxMenuItem}:
* <p>
* <img src="doc-files/MenuBar-1.gif"
* alt="Menu labeled Examples, containing items Basic, Simple, Check, and More Examples. The Check item is a CheckBoxMenuItem instance, in the off state."
* style="float:center; margin: 7px 10px;">
* <p>
- * The item labeled <code>Check</code> shows a check box menu item
+ * The item labeled {@code Check} shows a check box menu item
* in its "off" state.
* <p>
* When a check box menu item is selected, AWT sends an item event to
- * the item. Since the event is an instance of <code>ItemEvent</code>,
- * the <code>processEvent</code> method examines the event and passes
- * it along to <code>processItemEvent</code>. The latter method redirects
- * the event to any <code>ItemListener</code> objects that have
+ * the item. Since the event is an instance of {@code ItemEvent},
+ * the {@code processEvent} method examines the event and passes
+ * it along to {@code processItemEvent}. The latter method redirects
+ * the event to any {@code ItemListener} objects that have
* registered an interest in item events generated by this menu item.
*
* @author Sami Shaio
@@ -113,7 +113,7 @@
* The item's state is initially set to "off."
* @param label a string label for the check box menu item,
- * or <code>null</code> for an unlabeled menu item.
+ * or {@code null} for an unlabeled menu item.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
@@ -125,10 +125,10 @@
/**
* Create a check box menu item with the specified label and state.
* @param label a string label for the check box menu item,
- * or <code>null</code> for an unlabeled menu item.
+ * or {@code null} for an unlabeled menu item.
* @param state the initial state of the menu item, where
- * <code>true</code> indicates "on" and
- * <code>false</code> indicates "off."
+ * {@code true} indicates "on" and
+ * {@code false} indicates "off."
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
@@ -170,8 +170,8 @@
* is "on" or "off."
*
* @return the state of this check box menu item, where
- * <code>true</code> indicates "on" and
- * <code>false</code> indicates "off"
+ * {@code true} indicates "on" and
+ * {@code false} indicates "off"
* @see #setState
*/
public boolean getState() {
@@ -180,18 +180,18 @@
/**
* Sets this check box menu item to the specified state.
- * The boolean value <code>true</code> indicates "on" while
- * <code>false</code> indicates "off."
+ * The boolean value {@code true} indicates "on" while
+ * {@code false} indicates "off."
*
* <p>Note that this method should be primarily used to
* initialize the state of the check box menu item.
* Programmatically setting the state of the check box
* menu item 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 b <code>true</code> if the check box
- * menu item is on, otherwise <code>false</code>
+ * @param b {@code true} if the check box
+ * menu item is on, otherwise {@code false}
* @see #getState
*/
public synchronized void setState(boolean b) {
@@ -265,7 +265,7 @@
* Returns an array of all the item listeners
* registered on this checkbox menuitem.
*
- * @return all of this checkbox menuitem's <code>ItemListener</code>s
+ * @return all of this checkbox menuitem's {@code ItemListener}s
* or an empty array if no item
* listeners are currently registered
*
@@ -282,16 +282,16 @@
/**
* Returns an array of all the objects currently registered
* as <code><em>Foo</em>Listener</code>s
- * upon this <code>CheckboxMenuItem</code>.
+ * upon this {@code CheckboxMenuItem}.
* <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>CheckboxMenuItem</code> <code>c</code>
+ * {@code CheckboxMenuItem c}
* for its item listeners with the following code:
*
* <pre>ItemListener[] ils = (ItemListener[])(c.getListeners(ItemListener.class));</pre>
@@ -300,14 +300,14 @@
*
* @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 checkbox menuitem,
* 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
@@ -336,13 +336,13 @@
/**
* Processes events on this check box menu item.
- * If the event is an instance of <code>ItemEvent</code>,
- * this method invokes the <code>processItemEvent</code> method.
+ * If the event is an instance of {@code ItemEvent},
+ * this method invokes the {@code processItemEvent} method.
* If the event is not an item event,
- * it invokes <code>processEvent</code> on the superclass.
+ * it invokes {@code processEvent} on the superclass.
* <p>
* Check box menu items currently support only item events.
- * <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.
*
@@ -361,17 +361,17 @@
/**
* Processes item events occurring on this check box menu item by
- * dispatching them to any registered <code>ItemListener</code> objects.
+ * dispatching them to any registered {@code ItemListener} objects.
* <p>
* This method is not called unless item events are
* enabled for this menu item. 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.
*
@@ -403,11 +403,11 @@
/**
* Returns a string representing the state of this
- * <code>CheckBoxMenuItem</code>. This
+ * {@code CheckBoxMenuItem}. This
* method is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between
* implementations. The returned string may be empty but may not be
- * <code>null</code>.
+ * {@code null}.
*
* @return the parameter string of this check box menu item
*/
@@ -426,18 +426,18 @@
/**
* Writes default serializable fields to stream. Writes
- * a list of serializable <code>ItemListeners</code>
+ * a list of serializable {@code ItemListeners}
* as optional data. The non-serializable
- * <code>ItemListeners</code> are detected and
+ * {@code ItemListeners} are detected and
* no attempt is made to serialize them.
*
- * @param s the <code>ObjectOutputStream</code> to write
- * @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> indicates
+ * @param s the {@code ObjectOutputStream} to write
+ * @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 itemListenerK} indicating an
+ * {@code ItemListener} object
*
* @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
* @see java.awt.Component#itemListenerK
@@ -453,12 +453,12 @@
}
/*
- * Reads the <code>ObjectInputStream</code> and if it
- * isn't <code>null</code> adds a listener to receive
- * item events fired by the <code>Checkbox</code> menu item.
+ * Reads the {@code ObjectInputStream} and if it
+ * isn't {@code null} adds a listener to receive
+ * item events fired by the {@code Checkbox} menu item.
* Unrecognized keys or values will be ignored.
*
- * @param s the <code>ObjectInputStream</code> to read
+ * @param s the {@code ObjectInputStream} to read
* @serial
* @see removeActionListener()
* @see addActionListener()
@@ -515,7 +515,7 @@
* subclassed by menu component developers.
* <p>
* This class implements accessibility support for the
- * <code>CheckboxMenuItem</code> class. It provides an implementation
+ * {@code CheckboxMenuItem} class. It provides an implementation
* of the Java Accessibility API appropriate to checkbox menu item
* user-interface elements.
* @since 1.3