List of usage examples for com.vaadin.ui MenuBar setWidth
@Override public void setWidth(String width)
From source file:de.lmu.ifi.dbs.knowing.vaadin.MainApplication.java
License:Apache License
@SuppressWarnings("serial") private MenuBar getMenu() { MenuBar menubar = new MenuBar(); menubar.setWidth("100%"); homeMenu = menubar.addItem("Home", null); homeMenu.addItem("Run Process", new Command() { @Override//from ww w.ja va 2s.c o m public void menuSelected(MenuItem selectedItem) { contentPanel.removeAllComponents(); contentPanel.addComponent(new DPUSelection()); } }); homeMenu.addItem("Show Services", new Command() { @Override public void menuSelected(MenuItem selectedItem) { contentPanel.removeAllComponents(); contentPanel.addComponent(ComponentFactory.processorTable()); } }); homeMenu.addSeparator(); homeMenu.addItem("Logout", new Command() { @Override public void menuSelected(MenuItem selectedItem) { main.showNotification("Run your own DPU soon!"); } }); final MenuBar.MenuItem viewMenu = menubar.addItem("Help", null); viewMenu.addItem("About...", new Command() { @Override public void menuSelected(MenuItem selectedItem) { main.addWindow(getAboutDialog()); } }); return menubar; }
From source file:org.kani.Application.java
License:Apache License
private MenuBar getMenu() { MenuBar menubar = new MenuBar(); menubar.setWidth("100%"); actionMenu = menubar.addItem("Action", null); actionMenu.addItem("Built-in Action...", new Command() { public void menuSelected(MenuItem selectedItem) { main.showNotification("Built-in Action executed!"); }/*from www .j a va 2 s . c o m*/ }); final MenuBar.MenuItem viewMenu = menubar.addItem("Help", null); viewMenu.addItem("About...", new Command() { public void menuSelected(MenuItem selectedItem) { main.addWindow(getAboutDialog()); } }); return menubar; }
From source file:org.semanticsoft.vaaclipse.presentation.widgets.TrimmedWindowContent.java
License:Open Source License
public void setMenuBar(MenuBar menuBar) { for (int i = 0; i < this.getComponentCount(); i++) { Component c = this.getComponent(i); if (c instanceof MenuBar) this.removeComponent(c); }//w w w .j a va 2 s .c o m menuBar.setWidth("100%"); this.addComponent(menuBar, 0); }
From source file:org.semanticsoft.vaaclipse.widgets.WorkbenchWindow.java
License:Open Source License
public void setMenuBar(MenuBar menuBar) { for (int i = 0; i < windowContent.getComponentCount(); i++) { Component c = windowContent.getComponent(i); if (c instanceof MenuBar) windowContent.removeComponent(c); }// www . j av a 2 s.c om menuBar.setWidth("100%"); windowContent.addComponent(menuBar, 0); }
From source file:ru.codeinside.gses.webui.manager.ManagerWorkplace.java
License:Mozilla Public License
public ManagerWorkplace() { setSizeFull();/* ww w. j ava 2s . c o m*/ servicePanel = createServicePanel(); procedurePanel = createProcedurePanel1(); directoryPanel = DirectoryPanel.createDirectoryPanel(); final MenuBar menu = new MenuBar(); menu.setWidth("100%"); menu.addStyleName("submenu"); MenuBar.MenuItem servicesItem = menu.addItem("?", new MenuBar.Command() { @Override public void menuSelected(MenuBar.MenuItem selectedItem) { chooseTab(selectedItem, menu, servicePanel, procedurePanel, directoryPanel); } }); MenuBar.MenuItem administrativeProceduresItem = menu .addItem("?? ", new MenuBar.Command() { @Override public void menuSelected(MenuBar.MenuItem selectedItem) { chooseTab(selectedItem, menu, procedurePanel, servicePanel, directoryPanel); activateApInterface(); } }); menu.addItem("? ", new MenuBar.Command() { @Override public void menuSelected(MenuBar.MenuItem selectedItem) { chooseTab(selectedItem, menu, procedurePanel, servicePanel, directoryPanel); activateMpInterface(); } }); menu.addItem(" ?", new MenuBar.Command() { @Override public void menuSelected(MenuBar.MenuItem selectedItem) { chooseTab(selectedItem, menu, directoryPanel, servicePanel, procedurePanel); activateMpInterface(); } }); addComponent(menu); setExpandRatio(menu, 0.01f); administrativeProceduresItem.getCommand().menuSelected(administrativeProceduresItem); }