|
» Component » Label » Button » CheckBox » ComboBox » TextField » PasswordField » TextArea » TabbedPane » Panel » Desktop » Dialog » SpinBox » ProgressBar » Slider » SplitPane » List » Table » Tree » Separator » MenuBar
|
|
|
MenuBar
The following panel contains a menubar on the top and a large text-area.
The menubar has only one menu ('Menu'), it has a menuitem ('MenuItem')
and a menu ('Menu'). The later's popup contains a menuitem with a selected
checkbox ('CheckBox'), a separator, and a radio button ('RadioButton').
<panel columns="1" gap="4">
<menubar weightx="1">
<menu text="Menu">
<menuitem text="MenuItem" icon="image.gif" />
<menu text="Menu">
<checkboxmenuitem text="CheckBox" selected="true" />
<separator />
<checkboxmenuitem text="RadioButton" group="group"/>
</menu>
</menu>
</menubar>
<textarea weighty="1" />
</panel> |
Parameters
Name | Type | Default | Description |
name, enabled, visible, tooltip, width, height, colspan, rowspan,
weightx, weighty, halign, and valign parameters are similar to component
|
Menu
Menubar includes menu, and menu could contain menuitems, check or radio
button items, separators, and menus.
Parameters
Name | Type | Default | Description | mnemonic | integer | -1 |
Specifies the index of the underlined char and the key combination
which selects the menu.
|
name, enabled, text, icon, and alignment parameters are similar to combobox choice
|
MenuItem
A regular menu item can have either text or a graphic icon
associated with it, or both.
Parameters
Name | Type | Default | Description | accelerator | string | null |
The key combination which invokes the menuitem's action
method without navigating the menu hierarchy.
|
action | method | null |
Invokes the given method when the menuitem is pressed by mouse or keyboard.
|
mnemonic | integer | -1 |
Specifies the underlined char index (thus the key combination)
which invokes the action listener.
|
name, enabled, text, icon, and alignment parameters are similar to combobox choice
|
CheckBoxMenuItem
A menu item that can be selected or deselected. The selecte menuitem
appears with a checkmark next to it. A radio-button menu-item is a
menu item that is part of a group of menu items in which
only one item in the group can be selected.
Parameters
Name | Type | Default | Description | selected | boolean | false |
The state of the checkboxmenuitem.
|
group | string | null |
Identifies a group if not null. Only one radio menuitem at a time
can be selected in a group.
User can set on a radio menuitem, the selected menuitem of the group will be set off
(the group members is searched only in the same menu).
|
name, enabled, text, icon, and alignment parameters are similar to combobox choice
|
mnemonic, accelerator, and action parameters are described at menuitem
|
Keyboard-actions
Operation | Action | F10 | Moves focus to menu bar and posts first menu |
Up arrow | Selects previous item (or the last) |
Down arrow | Selects next item (or the first) |
Left arrow | Collapses last popupmenu, or selects previous (or the last) menu of menubar |
Right arrow | Expands menu, or selects next (or the first) menu of menubar |
Enter, Return, Spacebar | Activates a menu item, dismisses menu, and goes to last window item with focus |
Escape | Dismisses menu without taking action and returns focus to last component that had focus |
|