@Deprecated public class MenuBar extends com.google.gwt.user.client.ui.Widget implements com.google.gwt.user.client.ui.PopupListener
Command
or
open a cascaded menu bar.
Constructor and Description |
---|
MenuBar()
Deprecated.
Creates an empty horizontal menu bar.
|
MenuBar(boolean vertical)
Deprecated.
Creates an empty menu bar.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected void |
doItemAction(MenuItem item,
boolean fireCommand)
Deprecated.
|
boolean |
getAutoOpen()
Deprecated.
Gets whether this menu bar's child menus will open when the mouse is
moved over it.
|
MenuItem |
getFirstItem()
Deprecated.
Gets the first item from the menu or null if no items.
|
List<MenuItem> |
getItems()
Deprecated.
Returns a list containing the
MenuItem objects in the menu
bar. |
MenuItem |
getLastItem()
Deprecated.
Gest the last item from the menu or null if no items.
|
protected int |
getPreferredHeight()
Deprecated.
Gets the preferred height of the menu.
|
int |
getSelectedIndex()
Deprecated.
Gets the index of the selected item.
|
MenuItem |
getSelectedItem()
Deprecated.
Returns the
MenuItem that is currently selected
(highlighted) by the user. |
boolean |
isScrollActive()
Deprecated.
Gets whether the scroll is activate for this menu.
|
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 |
scrollSelectionIntoView()
Deprecated.
Scroll the selected item into view.
|
void |
selectItem(MenuItem item)
Deprecated.
|
void |
setAutoOpen(boolean autoOpen)
Deprecated.
Sets whether this menu bar's child menus will open when the mouse is
moved over it.
|
void |
setScrollEnabled(boolean enabled)
Deprecated.
Sets the menu scroll enabled or disabled.
|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
public MenuBar()
public MenuBar(boolean vertical)
vertical
- true
to orient the menu bar verticallypublic void addItem(MenuItem item)
item
- the item to be addedpublic MenuItem addItem(String text, boolean asHTML, com.google.gwt.user.client.Command cmd)
text
- the item's textasHTML
- true
to treat the specified text as htmlcmd
- the command to be firedMenuItem
object createdpublic MenuItem addItem(String text, boolean asHTML, MenuBar popup)
text
- the item's textasHTML
- true
to treat the specified text as htmlpopup
- the menu to be cascaded from itMenuItem
object createdpublic MenuItem addItem(String text, com.google.gwt.user.client.Command cmd)
text
- the item's textcmd
- the command to be firedMenuItem
object createdpublic MenuItem addItem(String text, MenuBar popup)
text
- the item's textpopup
- the menu to be cascaded from itMenuItem
object createdpublic void clearItems()
public boolean getAutoOpen()
true
if child menus will auto-openpublic void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
public void onPopupClosed(com.google.gwt.user.client.ui.PopupPanel sender, boolean autoClosed)
onPopupClosed
in interface com.google.gwt.user.client.ui.PopupListener
public void removeItem(MenuItem item)
item
- the item to be removedpublic void setAutoOpen(boolean autoOpen)
autoOpen
- true
to cause child menus to auto-openpublic List<MenuItem> getItems()
MenuItem
objects in the menu
bar. If there are no items in the menu bar, then an empty
List
object will be returned.MenuItem
objects in the menu
barpublic MenuItem getSelectedItem()
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.MenuItem
that is currently selected, or
null
if no items are currently selectedpublic MenuItem getFirstItem()
public MenuItem getLastItem()
public int getSelectedIndex()
protected void onDetach()
onDetach
in class com.google.gwt.user.client.ui.Widget
protected void doItemAction(MenuItem item, boolean fireCommand)
public void selectItem(MenuItem item)
public void scrollSelectionIntoView()
public void setScrollEnabled(boolean enabled)
enabled
- the enabled state of the scroll.public boolean isScrollActive()
protected int getPreferredHeight()
Copyright © 2018 Vaadin Ltd. All rights reserved.