com.vaadin.terminal.gwt.client.ui.
Class MenuBar
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.vaadin.terminal.gwt.client.ui.MenuBar
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.PopupListener
Direct Known Subclasses:
- extends com.google.gwt.user.client.ui.Widget
- implements com.google.gwt.user.client.ui.PopupListener
@Deprecated
public class MenuBar
A standard menu bar widget. A menu bar can contain any number of menu items,
each of which can either fire a Command
or
open a cascaded menu bar.
CSS Style Rules
- .gwt-MenuBar { the menu bar itself }
- .gwt-MenuBar .gwt-MenuItem { menu items }
- .gwt-MenuBar .gwt-MenuItem-selected { selected menu items }
Example
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
MenuBar()
Deprecated. Creates an empty horizontal menu bar. |
|
MenuBar(boolean vertical)
Deprecated. Creates an empty menu bar. |
Method Summary | |
---|---|
void |
addItem(MenuItem item)
Deprecated. Adds a menu item to the bar. |
MenuItem |
addItem(String text,
boolean asHTML,
com.google.gwt.user.client.Command cmd)
Deprecated. Adds a menu item to the bar, that will fire the given command when it is selected. |
MenuItem |
addItem(String text,
boolean asHTML,
MenuBar popup)
Deprecated. Adds a menu item to the bar, that will open the specified menu when it is selected. |
MenuItem |
addItem(String text,
com.google.gwt.user.client.Command cmd)
Deprecated. Adds a menu item to the bar, that will fire the given command when it is selected. |
MenuItem |
addItem(String text,
MenuBar popup)
Deprecated. Adds a menu item to the bar, that will open the specified menu when it is selected. |
void |
clearItems()
Deprecated. Removes all menu items from this menu bar. |
boolean |
getAutoOpen()
Deprecated. Gets whether this menu bar's child menus will open when the mouse is moved over it. |
protected List<MenuItem> |
getItems()
Deprecated. Returns a list containing the MenuItem objects in the menu
bar. |
protected MenuItem |
getSelectedItem()
Deprecated. Returns the MenuItem that is currently selected
(highlighted) by the user. |
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
Deprecated. |
protected void |
onDetach()
Deprecated. |
void |
onPopupClosed(com.google.gwt.user.client.ui.PopupPanel sender,
boolean autoClosed)
Deprecated. |
void |
removeItem(MenuItem item)
Deprecated. Removes the specified menu item from the bar. |
void |
setAutoOpen(boolean autoOpen)
Deprecated. Sets whether this menu bar's child menus will open when the mouse is moved over it. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
MenuBar
public MenuBar()
Deprecated.
Creates an empty horizontal menu bar.
MenuBar
public MenuBar(boolean vertical)
- Parameters:
vertical
-true
to orient the menu bar vertically
Deprecated.
Creates an empty menu bar.
Method Detail |
---|
addItem
public void addItem(MenuItem item)
- Parameters:
item
- the item to be added
Deprecated.
Adds a menu item to the bar.
addItem
public MenuItem addItem(String text,
boolean asHTML,
com.google.gwt.user.client.Command cmd)
- Parameters:
text
- the item's textasHTML
-true
to treat the specified text as htmlcmd
- the command to be fired- Returns:
- the
MenuItem
object created
Deprecated.
Adds a menu item to the bar, that will fire the given command when it is selected.
addItem
public MenuItem addItem(String text,
boolean asHTML,
MenuBar popup)
- Parameters:
text
- the item's textasHTML
-true
to treat the specified text as htmlpopup
- the menu to be cascaded from it- Returns:
- the
MenuItem
object created
Deprecated.
Adds a menu item to the bar, that will open the specified menu when it is selected.
addItem
public MenuItem addItem(String text,
com.google.gwt.user.client.Command cmd)
- Parameters:
text
- the item's textcmd
- the command to be fired- Returns:
- the
MenuItem
object created
Deprecated.
Adds a menu item to the bar, that will fire the given command when it is selected.
addItem
public MenuItem addItem(String text,
MenuBar popup)
- Parameters:
text
- the item's textpopup
- the menu to be cascaded from it- Returns:
- the
MenuItem
object created
Deprecated.
Adds a menu item to the bar, that will open the specified menu when it is selected.
clearItems
public void clearItems()
Deprecated.
Removes all menu items from this menu bar.
getAutoOpen
public boolean getAutoOpen()
- Returns:
true
if child menus will auto-open
Deprecated.
Gets whether this menu bar's child menus will open when the mouse is moved over it.
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEvent
in interfacecom.google.gwt.user.client.EventListener
- Overrides:
onBrowserEvent
in classcom.google.gwt.user.client.ui.Widget
Deprecated.
onPopupClosed
public void onPopupClosed(com.google.gwt.user.client.ui.PopupPanel sender,
boolean autoClosed)
- Specified by:
onPopupClosed
in interfacecom.google.gwt.user.client.ui.PopupListener
Deprecated.
removeItem
public void removeItem(MenuItem item)
- Parameters:
item
- the item to be removed
Deprecated.
Removes the specified menu item from the bar.
setAutoOpen
public void setAutoOpen(boolean autoOpen)
- Parameters:
autoOpen
-true
to cause child menus to auto-open
Deprecated.
Sets whether this menu bar's child menus will open when the mouse is moved over it.
getItems
protected List<MenuItem> getItems()
- Returns:
- a list containing the
MenuItem
objects in the menu bar
Deprecated.
Returns a list containing the MenuItem
objects in the menu
bar. If there are no items in the menu bar, then an empty
List
object will be returned.
getSelectedItem
protected MenuItem getSelectedItem()
- Returns:
- the
MenuItem
that is currently selected, ornull
if no items are currently selected
Deprecated.
Returns the MenuItem
that is currently selected
(highlighted) by the user. If none of the items in the menu are currently
selected, then null
will be returned.
onDetach
protected void onDetach()
- Overrides:
onDetach
in classcom.google.gwt.user.client.ui.Widget
Deprecated.