Package com.vaadin.ui.MenuBar

Examples of com.vaadin.ui.MenuBar.MenuItem.addItem()


        mb.addItem("Item 1", null);
        mb.addItem("Item 2 - hidden", null).setVisible(false);
        MenuItem submenu = mb.addItem("Item 3 - sub menu", null);
        mb.addItem("Item 4 - hidden", null).setVisible(false);
        submenu.addItem("Sub item 1 - disabled", null).setEnabled(false);
        submenu.addItem("Sub item 2 - enabled", null);
        submenu.addItem("Sub item 3 - visible", null);
        submenu.addItem("Sub item 4 - hidden", null).setVisible(false);

        addComponent(mb);
    }
View Full Code Here


        mb.addItem("Item 2 - hidden", null).setVisible(false);
        MenuItem submenu = mb.addItem("Item 3 - sub menu", null);
        mb.addItem("Item 4 - hidden", null).setVisible(false);
        submenu.addItem("Sub item 1 - disabled", null).setEnabled(false);
        submenu.addItem("Sub item 2 - enabled", null);
        submenu.addItem("Sub item 3 - visible", null);
        submenu.addItem("Sub item 4 - hidden", null).setVisible(false);

        addComponent(mb);
    }
View Full Code Here

        MenuItem submenu = mb.addItem("Item 3 - sub menu", null);
        mb.addItem("Item 4 - hidden", null).setVisible(false);
        submenu.addItem("Sub item 1 - disabled", null).setEnabled(false);
        submenu.addItem("Sub item 2 - enabled", null);
        submenu.addItem("Sub item 3 - visible", null);
        submenu.addItem("Sub item 4 - hidden", null).setVisible(false);

        addComponent(mb);
    }

    @Override
View Full Code Here

        item1.setStyleName("my-menu-item");
        submenu1.addItem("Item2", null);

        MenuItem submenu2 = mainMenu.addItem("Submenu2", null);
        MenuItem menu1 = submenu2.addItem("Menu1", null);
        menu1.addItem("Item11", null);

        addComponent(mainMenu);

        addComponent(new Button("Change primary stylename",
                new Button.ClickListener() {
View Full Code Here

    @Override
    protected void initializeComponents() {
        MenuBar m = new MenuBar();
        MenuItem submenu = m.addItem("Item <u>1</u>", getIcon(), null);
        MenuItem subsubmenu = submenu.addItem("<b>Bold</b> item", null);
        subsubmenu.addItem("<i><u>I</u>talic</i> item", getIcon(), null);
        submenu.addItem(
                "<span style='font-size: 30px'>Big</span> <span style='font-size: 8px'>disabled</span> item",
                null).setEnabled(false);

        m.addItem("<span style='font-size: 30px'>Big</span> item", null);
View Full Code Here

     * Returns a menu bar with three levels of nesting but no icons.
     */
    private MenuBar createFirstMenuBar() {
        MenuBar menuBar = new MenuBar();
        MenuItem file = menuBar.addItem("File", null);
        file.addItem("Open", selectionCommand);
        file.addItem("Save", selectionCommand);
        file.addItem("Save As..", selectionCommand);
        file.addSeparator();
        MenuItem export = file.addItem("Export..", null);
        export.addItem("As PDF...", selectionCommand);
View Full Code Here

     */
    private MenuBar createFirstMenuBar() {
        MenuBar menuBar = new MenuBar();
        MenuItem file = menuBar.addItem("File", null);
        file.addItem("Open", selectionCommand);
        file.addItem("Save", selectionCommand);
        file.addItem("Save As..", selectionCommand);
        file.addSeparator();
        MenuItem export = file.addItem("Export..", null);
        export.addItem("As PDF...", selectionCommand);
        export.addItem("As Doc...", selectionCommand);
View Full Code Here

    private MenuBar createFirstMenuBar() {
        MenuBar menuBar = new MenuBar();
        MenuItem file = menuBar.addItem("File", null);
        file.addItem("Open", selectionCommand);
        file.addItem("Save", selectionCommand);
        file.addItem("Save As..", selectionCommand);
        file.addSeparator();
        MenuItem export = file.addItem("Export..", null);
        export.addItem("As PDF...", selectionCommand);
        export.addItem("As Doc...", selectionCommand);
        file.addSeparator();
View Full Code Here

        file.addItem("Open", selectionCommand);
        file.addItem("Save", selectionCommand);
        file.addItem("Save As..", selectionCommand);
        file.addSeparator();
        MenuItem export = file.addItem("Export..", null);
        export.addItem("As PDF...", selectionCommand);
        export.addItem("As Doc...", selectionCommand);
        file.addSeparator();
        file.addItem("Exit", selectionCommand);

        MenuItem edit = menuBar.addItem("Edit", null);
View Full Code Here

        file.addItem("Save", selectionCommand);
        file.addItem("Save As..", selectionCommand);
        file.addSeparator();
        MenuItem export = file.addItem("Export..", null);
        export.addItem("As PDF...", selectionCommand);
        export.addItem("As Doc...", selectionCommand);
        file.addSeparator();
        file.addItem("Exit", selectionCommand);

        MenuItem edit = menuBar.addItem("Edit", null);
        edit.addItem("Copy", selectionCommand);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.