29 import java.awt.peer.MenuBarPeer;
30 import java.io.IOException;
31 import java.io.ObjectInputStream;
32 import java.io.ObjectOutputStream;
33 import java.util.Enumeration;
34 import java.util.EventListener;
35 import java.util.Vector;
36
37 import javax.accessibility.Accessible;
38 import javax.accessibility.AccessibleContext;
39 import javax.accessibility.AccessibleRole;
40
41 import sun.awt.AWTAccessor;
42
43 /**
44 * The {@code MenuBar} class encapsulates the platform's
45 * concept of a menu bar bound to a frame. In order to associate
46 * the menu bar with a {@code Frame} object, call the
47 * frame's {@code setMenuBar} method.
48 * <p>
49 * <A NAME="mbexample"></A><!-- target for cross references -->
50 * This is what a menu bar might look like:
51 * <p>
52 * <img src="doc-files/MenuBar-1.gif"
53 * alt="Diagram of MenuBar containing 2 menus: Examples and Options.
54 * Examples menu is expanded showing items: Basic, Simple, Check, and More Examples."
55 * style="float:center; margin: 7px 10px;">
56 * <p>
57 * A menu bar handles keyboard shortcuts for menu items, passing them
58 * along to its child menus.
59 * (Keyboard shortcuts, which are optional, provide the user with
60 * an alternative to the mouse for invoking a menu item and the
61 * action that is associated with it.)
62 * Each menu item can maintain an instance of {@code MenuShortcut}.
63 * The {@code MenuBar} class defines several methods,
64 * {@link MenuBar#shortcuts} and
65 * {@link MenuBar#getShortcutMenuItem}
66 * that retrieve information about the shortcuts a given
67 * menu bar is managing.
68 *
69 * @author Sami Shaio
|
29 import java.awt.peer.MenuBarPeer;
30 import java.io.IOException;
31 import java.io.ObjectInputStream;
32 import java.io.ObjectOutputStream;
33 import java.util.Enumeration;
34 import java.util.EventListener;
35 import java.util.Vector;
36
37 import javax.accessibility.Accessible;
38 import javax.accessibility.AccessibleContext;
39 import javax.accessibility.AccessibleRole;
40
41 import sun.awt.AWTAccessor;
42
43 /**
44 * The {@code MenuBar} class encapsulates the platform's
45 * concept of a menu bar bound to a frame. In order to associate
46 * the menu bar with a {@code Frame} object, call the
47 * frame's {@code setMenuBar} method.
48 * <p>
49 * <a id="mbexample"></a><!-- target for cross references -->
50 * This is what a menu bar might look like:
51 * <p>
52 * <img src="doc-files/MenuBar-1.gif"
53 * alt="Diagram of MenuBar containing 2 menus: Examples and Options.
54 * Examples menu is expanded showing items: Basic, Simple, Check, and More Examples."
55 * style="float:center; margin: 7px 10px;">
56 * <p>
57 * A menu bar handles keyboard shortcuts for menu items, passing them
58 * along to its child menus.
59 * (Keyboard shortcuts, which are optional, provide the user with
60 * an alternative to the mouse for invoking a menu item and the
61 * action that is associated with it.)
62 * Each menu item can maintain an instance of {@code MenuShortcut}.
63 * The {@code MenuBar} class defines several methods,
64 * {@link MenuBar#shortcuts} and
65 * {@link MenuBar#getShortcutMenuItem}
66 * that retrieve information about the shortcuts a given
67 * menu bar is managing.
68 *
69 * @author Sami Shaio
|