Java 类com.google.gwt.user.client.ui.MenuItemSeparator 实例源码

项目:LAS    文件:HelpMenuBarImpl.java   
public HelpMenuBarImpl() {

        helpMenuBar = new AutoCloseMenuBar(false);
        helpMenuBar.setSize("100%", "100%");
        helpMenuBar.setAnimationEnabled(true);
        initWidget(helpMenuBar);
        helpSubMenuBar = new AutoCloseMenuBar(true);
        helpSubMenuBar.setAnimationEnabled(true);

        helpMenu = new MenuItem("Help", false, helpSubMenuBar);
        helpMenu.setSize("100%", "100%");

        onlineDocsItem = new MenuItem("Online Documentation", false, (Command) null);
        helpSubMenuBar.addItem(onlineDocsItem);

        videoTutorialsItem = new MenuItem("Video Tutorials", false, (Command) null);
        helpSubMenuBar.addItem(videoTutorialsItem);

        separator = new MenuItemSeparator();
        helpSubMenuBar.addSeparator(separator);

        aboutItem = new MenuItem("About", false, (Command) null);
        helpSubMenuBar.addItem(aboutItem);

        helpMenuBar.addItem(helpMenu);
//        initWidget(binder.createAndBindUi(this));
        helpMenu.ensureDebugId("helpMenu");
    }
项目:appinventor-extensions    文件:ContextMenu.java   
/**
 * Adds a separator to the context menu.
 */
public void addSeparator() {
  MenuItemSeparator menuItemSeparator = menuBar.addSeparator();
  menuItemSeparator.setStylePrimaryName("ode-ContextMenuItemSeparator");
}
项目:LAS    文件:HelpMenuBar.java   
public HelpMenuBar() {


        helpMenuBar = new AutoCloseMenuBar(false);
        helpMenuBar.setSize("100%", "100%");
        helpMenuBar.setAnimationEnabled(true);

        helpSubMenuBar = new AutoCloseMenuBar(true);
        helpSubMenuBar.setAnimationEnabled(true);

        helpMenu = new MenuItem("Help", false, helpSubMenuBar);
        helpMenu.setSize("100%", "100%");

        onlineDocsItem = new MenuItem("Online Documentation", false, (Command) null);
        helpSubMenuBar.addItem(onlineDocsItem);

        videoTutorialsItem = new MenuItem("Video Tutorials", false, (Command) null);
        helpSubMenuBar.addItem(videoTutorialsItem);

        separator = new MenuItemSeparator();
        helpSubMenuBar.addSeparator(separator);

        aboutItem = new MenuItem("About", false, (Command) null);
        helpSubMenuBar.addItem(aboutItem);

        helpMenuBar.addItem(helpMenu);
//        initWidget(binder.createAndBindUi(this));
        helpMenu.ensureDebugId("helpMenu");

      initWidget(helpMenuBar);

        // Make menu commands
        Command aboutCmd = new Command() {
            @Override
            public void execute() {
                Window.open(Util.getProductServer(), "_blank", "scrollbars=1");
            }
        };
        aboutItem.setCommand(aboutCmd);

        Command tutorialsCmd = new Command() {
            @Override
            public void execute() {
                Window.open("http://ferret.pmel.noaa.gov/LAS/documentation/introduction/using-the-las-user-interface#videos", "_blank", "scrollbars=1");
            }
        };
        videoTutorialsItem.setCommand(tutorialsCmd);

        Command docsCmd = new Command() {
            @Override
            public void execute() {
                Window.open("http://ferret.pmel.noaa.gov/LAS/home/documentation/introduction/using-the-las-user-interface/", "_blank", "scrollbars=1");
            }
        };
        onlineDocsItem.setCommand(docsCmd);
        onlineDocsItem.setSize("100%", "100%");


    }