A standard menu bar widget. A menu bar can contain any number of menu items,
each of which can either fire a
Scheduler.ScheduledCommand
or
open a cascaded menu bar.
CSS Style Rules
- .gwt-MenuBar
- the menu bar itself
- .gwt-MenuBar-horizontal
- dependent style applied to horizontal menu bars
- .gwt-MenuBar-vertical
- dependent style applied to vertical menu bars
- .gwt-MenuBar .gwt-MenuItem
- menu items
- .gwt-MenuBar .gwt-MenuItem-selected
- selected menu items
- .gwt-MenuBar .gwt-MenuItemSeparator
- section breaks between menu items
- .gwt-MenuBar .gwt-MenuItemSeparator .menuSeparatorInner
- inner component of section separators
- .gwt-MenuBarPopup .menuPopupTopLeft
- the top left cell
- .gwt-MenuBarPopup .menuPopupTopLeftInner
- the inner element of the cell
- .gwt-MenuBarPopup .menuPopupTopCenter
- the top center cell
- .gwt-MenuBarPopup .menuPopupTopCenterInner
- the inner element of the cell
- .gwt-MenuBarPopup .menuPopupTopRight
- the top right cell
- .gwt-MenuBarPopup .menuPopupTopRightInner
- the inner element of the cell
- .gwt-MenuBarPopup .menuPopupMiddleLeft
- the middle left cell
- .gwt-MenuBarPopup .menuPopupMiddleLeftInner
- the inner element of the cell
- .gwt-MenuBarPopup .menuPopupMiddleCenter
- the middle center cell
- .gwt-MenuBarPopup .menuPopupMiddleCenterInner
- the inner element of the cell
- .gwt-MenuBarPopup .menuPopupMiddleRight
- the middle right cell
- .gwt-MenuBarPopup .menuPopupMiddleRightInner
- the inner element of the cell
- .gwt-MenuBarPopup .menuPopupBottomLeft
- the bottom left cell
- .gwt-MenuBarPopup .menuPopupBottomLeftInner
- the inner element of the cell
- .gwt-MenuBarPopup .menuPopupBottomCenter
- the bottom center cell
- .gwt-MenuBarPopup .menuPopupBottomCenterInner
- the inner element of the cell
- .gwt-MenuBarPopup .menuPopupBottomRight
- the bottom right cell
- .gwt-MenuBarPopup .menuPopupBottomRightInner
- the inner element of the cell
Example
Use in UiBinder Templates
MenuBar elements in UiBinder template files can have a vertical
boolean attribute (which defaults to false), and may have only MenuItem
elements as children. MenuItems may contain HTML and MenuBars.
For example:
<g:MenuBar>
<g:MenuItem>Higgledy
<g:MenuBar vertical="true">
<g:MenuItem>able</g:MenuItem>
<g:MenuItem>baker</g:MenuItem>
<g:MenuItem>charlie</g:MenuItem>
</g:MenuBar>
</g:MenuItem>
<g:MenuItem>Piggledy
<g:MenuBar vertical="true">
<g:MenuItem>foo</g:MenuItem>
<g:MenuItem>bar</g:MenuItem>
<g:MenuItem>baz</g:MenuItem>
</g:MenuBar>
</g:MenuItem>
<g:MenuItem><b>Pop!</b>
<g:MenuBar vertical="true">
<g:MenuItem>uno</g:MenuItem>
<g:MenuItem>dos</g:MenuItem>
<g:MenuItem>tres</g:MenuItem>
</g:MenuBar>
</g:MenuItem>
</g:MenuBar>