|Java TM Look and Feel Design Guidelines: Advanced Topics > Part I: General Topics > 3: Menus > Menu Elements||
Figure 22 shows menus elements in a typical application.Figure 22 Menu Elements
In Figure 22:
In drop-down menus, ensure that the label of each menu item differs from the menu title.
An item's mnemonic differs from its keyboard shortcut. Figure 22 shows mnemonics and keyboard shortcuts for items in a typical File menu.
Table 5 lists mnemonics for typical menus and menu items. To use the mnemonics in Table 5, users can simultaneously press the Alt key and the character key that corresponds to the underlined letter or numeral. (For more information, see Chapter 6 of Java Look and Feel Design Guidelines , 2d ed.)
|Menu Title||Menu Items|
|File||New, Ne w Window, Open, Open in New Win dow, Open in Curren t Window, Close, Save, S ave As, Page Set up, Print, P references, File Prop erties 1 , E xit|
|Edit||Undo, Redo, Cu t, Copy, Paste, Delete, Find, Fi nd Again, Select All|
|Fo rmat||Bold, Italic, Underline, Align Left, Align Center, Align Right|
|View||Lar ge Icons, S mall Icons, List, Details, Sort By, Filter, Zoom In, Zoom Out, Refresh|
|Help||Contents, Tutorial, Index, Search, About Application-Name|
| 1 Assign "e" as the mnemonic for the File Prop erties item only if the name represented by File contains no
better letter for the mnemonic.
Table 6 lists common keyboard shortcuts.
|Sequence||Equivalent Menu Item|
|Ctrl-N||New (File menu)|
|Ctrl-O||Open (File menu)|
|Ctrl-W||Close (File menu)|
|Ctrl-S||Save (File menu)|
|Ctrl-P||Print (File menu)|
|Ctrl-Z||Undo (Edit menu)|
|Ctrl-Y||Redo (Edit menu)|
|Ctrl-X||Cut (Edit menu)|
|Ctrl-C||Copy (Edit menu)|
|Ctrl-V||Paste (Edit menu)|
|Delete||Delete (Edit menu)|
|Ctrl-F||Find (Edit menu)|
|Ctrl-G||Find Again (Edit menu)|
|Ctrl-H||Replace (Edit menu)|
|Ctrl-A||Select All (Edit menu)|
|Ctrl-B||Bold (Format menu)|
|Ctrl-I||Italic (Format menu)|
|Ctrl-U||Underline (Format menu)|
|Ctrl-J||Justify (Format menu)|
|Ctrl-L||Align Left (Format menu)|
|Ctrl-E||Align Center (Format menu)|
|Ctrl-R||Align Right (Format menu)|
For more information about keyboard shortcuts and mnemonics, see those topics in Chapter 6 of Java Look and Feel Design Guidelines , 2d ed. and elsewhere in that book.
Assign mnemonics to all menu titles and menu items. Use the mnemonics in Table 5 if your application includes any of the menu titles and menu items listed there.
Provide keyboard shortcuts for frequently used menu items. Use the keyboard shortcuts in Table 6, if possible.
A menu item is dimmed when its command is unavailable. In Figure 23, the Paste and Paste Special items are unavailable and, therefore, dimmed.Figure 23 Menu With Unavailable Items
Dim a menu item if it represents an unavailable command, and users can make that command available without exiting the application. If the command becomes available, undim the menu item. (For more information on available and unavailable menu items, see Chapter 9 of Java Look and Feel Design Guidelines , 2d ed.)
You can group menu items by inserting separators between groups. In Figure 23, the Undo and Redo items of the Edit menu are a group, set apart from the menu's other groups by a separator.
An ellipsis (...) at the end of a menu item indicates that an application needs additional user input to execute the item's command. An ellipsis indicates that the application will display a dialog box before executing the command. However, not all menu items that open additional windows should have an ellipsis. For example, the About item in a Help menu should not end in an ellipsis.
Do not place an ellipsis (...) after a menu item that opens a property window.
You can place graphics before the leading edge of menu items, as in Figure 22.
Provide menu item graphics only if there are corresponding toolbar button graphics in your application. The graphics help users associate the toolbar button with the corresponding menu command. Provide menu item graphics for all the qualified menu items or for none of them.
The recommended menu graphics are at the following web site:
|Java Look and Feel Design Guidelines: Advanced Topics.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved.