List of usage examples for com.google.gwt.user.client.ui MenuBar removeItem
public void removeItem(MenuItem item)
From source file:com.ikon.frontend.client.widget.mainmenu.Bookmark.java
License:Open Source License
/** * Resets all widgets on menu//w w w .j av a 2 s. c o m */ private void resetMenu() { if (!bookmarks.isEmpty()) { MenuBar subMenuBookmark = Main.get().mainPanel.topPanel.mainMenu.subMenuBookmark; for (Iterator<MenuItem> it = bookmarks.iterator(); it.hasNext();) { subMenuBookmark.removeItem(it.next()); } } }
From source file:net.sf.mmm.client.ui.impl.gwt.widget.menu.adapter.UiWidgetAdapterGwtMenuItemBase.java
License:Apache License
/** * {@inheritDoc}/*w w w . ja v a 2s .co m*/ */ @Override public void removeFromParent() { // not supported by GWT MenuItem item = getToplevelWidget(); MenuBar menu = item.getParentMenu(); if (menu != null) { menu.removeItem(item); } }