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"); }
/** * Adds a separator to the context menu. */ public void addSeparator() { MenuItemSeparator menuItemSeparator = menuBar.addSeparator(); menuItemSeparator.setStylePrimaryName("ode-ContextMenuItemSeparator"); }
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%"); }