com.vaadin.client.ui.menubar
Class MenuBar

java.lang.Object
  extended by Widget
      extended by com.vaadin.client.ui.menubar.MenuBar
Direct Known Subclasses:
VFilterSelect.SuggestionMenu

Deprecated.

@Deprecated
public class MenuBar
extends Widget

A standard menu bar widget. A menu bar can contain any number of menu items, each of which can either fire a com.google.gwt.user.client.Command or open a cascaded menu bar.

CSS Style Rules

Example


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(java.lang.String text, boolean asHTML, Command cmd)
          Deprecated. Adds a menu item to the bar, that will fire the given command when it is selected.
 MenuItem addItem(java.lang.String text, Command cmd)
          Deprecated. Adds a menu item to the bar, that will fire the given command 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.
 java.util.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(Event event)
          Deprecated.  
protected  void onDetach()
          Deprecated.  
 void onPopupClosed(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuBar

public MenuBar()
Deprecated. 
Creates an empty horizontal menu bar.


MenuBar

public MenuBar(boolean vertical)
Deprecated. 
Creates an empty menu bar.

Parameters:
vertical - true to orient the menu bar vertically
Method Detail

addItem

public void addItem(MenuItem item)
Deprecated. 
Adds a menu item to the bar.

Parameters:
item - the item to be added

addItem

public MenuItem addItem(java.lang.String text,
                        boolean asHTML,
                        Command cmd)
Deprecated. 
Adds a menu item to the bar, that will fire the given command when it is selected.

Parameters:
text - the item's text
asHTML - true to treat the specified text as html
cmd - the command to be fired
Returns:
the MenuItem object created

addItem

public MenuItem addItem(java.lang.String text,
                        Command cmd)
Deprecated. 
Adds a menu item to the bar, that will fire the given command when it is selected.

Parameters:
text - the item's text
cmd - the command to be fired
Returns:
the MenuItem object created

clearItems

public void clearItems()
Deprecated. 
Removes all menu items from this menu bar.


getAutoOpen

public boolean getAutoOpen()
Deprecated. 
Gets whether this menu bar's child menus will open when the mouse is moved over it.

Returns:
true if child menus will auto-open

onBrowserEvent

public void onBrowserEvent(Event event)
Deprecated. 

onPopupClosed

public void onPopupClosed(PopupPanel sender,
                          boolean autoClosed)
Deprecated. 

removeItem

public void removeItem(MenuItem item)
Deprecated. 
Removes the specified menu item from the bar.

Parameters:
item - the item to be removed

setAutoOpen

public void setAutoOpen(boolean autoOpen)
Deprecated. 
Sets whether this menu bar's child menus will open when the mouse is moved over it.

Parameters:
autoOpen - true to cause child menus to auto-open

getItems

public java.util.List<MenuItem> getItems()
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.

Returns:
a list containing the MenuItem objects in the menu bar

getSelectedItem

public MenuItem getSelectedItem()
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.

Returns:
the MenuItem that is currently selected, or null if no items are currently selected

getFirstItem

public MenuItem getFirstItem()
Deprecated. 
Gets the first item from the menu or null if no items.

Returns:
the first item from the menu or null if no items.
Since:
7.2.6

getLastItem

public MenuItem getLastItem()
Deprecated. 
Gest the last item from the menu or null if no items.

Returns:
the last item from the menu or null if no items.
Since:
7.2.6

getSelectedIndex

public int getSelectedIndex()
Deprecated. 
Gets the index of the selected item.

Returns:
the index of the selected item.
Since:
7.2.6

onDetach

protected void onDetach()
Deprecated. 

doItemAction

protected void doItemAction(MenuItem item,
                            boolean fireCommand)
Deprecated. 

selectItem

public void selectItem(MenuItem item)
Deprecated. 

scrollSelectionIntoView

public void scrollSelectionIntoView()
Deprecated. 
Scroll the selected item into view.

Since:
7.2.6

setScrollEnabled

public void setScrollEnabled(boolean enabled)
Deprecated. 
Sets the menu scroll enabled or disabled.

Parameters:
enabled - the enabled state of the scroll.
Since:
7.2.6

isScrollActive

public boolean isScrollActive()
Deprecated. 
Gets whether the scroll is activate for this menu.

Returns:
true if the scroll is active, otherwise false.
Since:
7.2.6

getPreferredHeight

protected int getPreferredHeight()
Deprecated. 
Gets the preferred height of the menu.

Since:
7.2.6


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.