< prev index next >
src/java.desktop/share/classes/java/awt/MenuBar.java
Print this page
@@ -32,14 +32,14 @@
import java.awt.peer.MenuBarPeer;
import java.awt.event.KeyEvent;
import javax.accessibility.*;
/**
- * The <code>MenuBar</code> class encapsulates the platform's
+ * The {@code MenuBar} class encapsulates the platform's
* concept of a menu bar bound to a frame. In order to associate
- * the menu bar with a <code>Frame</code> object, call the
- * frame's <code>setMenuBar</code> method.
+ * the menu bar with a {@code Frame} object, call the
+ * frame's {@code setMenuBar} method.
* <p>
* <A NAME="mbexample"></A><!-- target for cross references -->
* This is what a menu bar might look like:
* <p>
* <img src="doc-files/MenuBar-1.gif"
@@ -50,12 +50,12 @@
* A menu bar handles keyboard shortcuts for menu items, passing them
* along to its child menus.
* (Keyboard shortcuts, which are optional, provide the user with
* an alternative to the mouse for invoking a menu item and the
* action that is associated with it.)
- * Each menu item can maintain an instance of <code>MenuShortcut</code>.
- * The <code>MenuBar</code> class defines several methods,
+ * Each menu item can maintain an instance of {@code MenuShortcut}.
+ * The {@code MenuBar} class defines several methods,
* {@link MenuBar#shortcuts} and
* {@link MenuBar#getShortcutMenuItem}
* that retrieve information about the shortcuts a given
* menu bar is managing.
*
@@ -287,11 +287,11 @@
/**
* Gets the number of menus on the menu bar.
*
* @return the number of menus on the menu bar.
* @deprecated As of JDK version 1.1,
- * replaced by <code>getMenuCount()</code>.
+ * replaced by {@code getMenuCount()}.
*/
@Deprecated
public int countMenus() {
return getMenuCountImpl();
}
@@ -340,13 +340,13 @@
}
return shortcuts.elements();
}
/**
- * Gets the instance of <code>MenuItem</code> associated
- * with the specified <code>MenuShortcut</code> object,
- * or <code>null</code> if none of the menu items being managed
+ * Gets the instance of {@code MenuItem} associated
+ * with the specified {@code MenuShortcut} object,
+ * or {@code null} if none of the menu items being managed
* by this menu bar is associated with the specified menu
* shortcut.
* @param s the specified menu shortcut.
* @return the menu item for the specified shortcut.
* @see java.awt.MenuItem
@@ -418,11 +418,11 @@
private int menuBarSerializedDataVersion = 1;
/**
* Writes default serializable fields to stream.
*
- * @param s the <code>ObjectOutputStream</code> to write
+ * @param s the {@code ObjectOutputStream} to write
* @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
* @see #readObject(java.io.ObjectInputStream)
*/
private void writeObject(java.io.ObjectOutputStream s)
throws java.lang.ClassNotFoundException,
@@ -430,17 +430,17 @@
{
s.defaultWriteObject();
}
/**
- * Reads the <code>ObjectInputStream</code>.
+ * Reads the {@code ObjectInputStream}.
* Unrecognized keys or values will be ignored.
*
- * @param s the <code>ObjectInputStream</code> to read
+ * @param s the {@code ObjectInputStream} to read
* @exception HeadlessException if
- * <code>GraphicsEnvironment.isHeadless</code> returns
- * <code>true</code>
+ * {@code GraphicsEnvironment.isHeadless} returns
+ * {@code true}
* @see java.awt.GraphicsEnvironment#isHeadless
* @see #writeObject(java.io.ObjectOutputStream)
*/
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException, HeadlessException
@@ -492,11 +492,11 @@
* accessibility. This class is not meant to be used directly by
* application developers, but is instead meant only to be
* subclassed by menu component developers.
* <p>
* This class implements accessibility support for the
- * <code>MenuBar</code> class. It provides an implementation of the
+ * {@code MenuBar} class. It provides an implementation of the
* Java Accessibility API appropriate to menu bar user-interface elements.
* @since 1.3
*/
protected class AccessibleAWTMenuBar extends AccessibleAWTMenuComponent
{
< prev index next >