Example usage for com.vaadin.ui MenuBar removeItem

List of usage examples for com.vaadin.ui MenuBar removeItem

Introduction

In this page you can find the example usage for com.vaadin.ui MenuBar removeItem.

Prototype

public void removeItem(MenuBar.MenuItem item) 

Source Link

Document

Remove first occurrence the specified item from the main menu.

Usage

From source file:org.semanticsoft.vaaclipse.presentation.renderers.MenuRenderer.java

License:Open Source License

@Override
public void removeChildGui(MUIElement element, MElementContainer<MUIElement> parent) {
    MenuItem childItem = (MenuItem) element.getWidget();

    if (parent.getWidget() instanceof MenuBar) {
        MenuBar bar = (MenuBar) parent.getWidget();
        bar.removeItem(childItem);
    } else if (parent.getWidget() instanceof MenuItem) {
        MenuItem parentItem = (MenuItem) parent.getWidget();
        parentItem.removeChild(childItem);
    }/*from  w w  w .j a va  2s.  com*/
}