use of com.vaadin.flow.component.menubar.MenuBar in project layout-examples by vaadin.
the class PricingView method createTopMenu.
public Component createTopMenu() {
MenuBar menuBar = new MenuBar();
menuBar.addThemeVariants(MenuBarVariant.LUMO_TERTIARY);
menuBar.addItem(new Anchor("#features", "Features"));
menuBar.addItem(new Anchor("#enterprise", "Enterprise"));
menuBar.addItem(new Anchor("#support", "Support"));
menuBar.addItem(new Anchor("#pricing", "Pricing"));
menuBar.addItem(new Button("Sign up"));
return menuBar;
}
use of com.vaadin.flow.component.menubar.MenuBar in project flow-components by vaadin.
the class MenuBarTest method removeNonChildItem_throws.
@Test(expected = IllegalArgumentException.class)
public void removeNonChildItem_throws() {
MenuItem item = new MenuBar().addItem("foo");
menuBar.remove(item);
}
Aggregations