List of usage examples for com.vaadin.ui TabSheet TabSheet
public TabSheet()
From source file:com.pms.component.ganttchart.scheduletask.UserStoryGanntChart.java
License:Apache License
public Component init(Project project) { this.project = project; ganttListener = null;/*from w ww .j av a 2 s.c o m*/ createGantt(project); MenuBar menu = controlsMenuBar(); Panel controls = createControls(); TabSheet tabsheet = new TabSheet(); tabsheet.setSizeFull(); /* Component wrapper = UriFragmentWrapperFactory.wrapByUriFragment(UI.getCurrent().getPage().getUriFragment(), gantt); if (wrapper instanceof GanttListener) { ganttListener = (GanttListener) wrapper; }*/ //to show table Component wrapper = UriFragmentWrapperFactory.wrapByUriFragment("table", gantt); if (wrapper instanceof GanttListener) { ganttListener = (GanttListener) wrapper; } final VerticalLayout layout = new VerticalLayout(); layout.setStyleName("demoContentLayout"); layout.setSizeFull(); //layout.addComponent(menu); layout.addComponent(controls); layout.addComponent(wrapper); layout.setExpandRatio(wrapper, 1); controls.setVisible(false); return layout; }
From source file:com.pms.component.member.taskganntchart.TaskGanttChart.java
License:Apache License
public Component init(Project project) { this.project = project; ganttListener = null;//from www .j a v a 2s. co m createGantt(project); //MenuBar menu = controlsMenuBar(); Panel controls = createControls(); TabSheet tabsheet = new TabSheet(); tabsheet.setSizeFull(); //to show table Component wrapper = UriFragmentWrapperFactory.wrapByUriFragment("table", gantt); if (wrapper instanceof GanttListener) { ganttListener = (GanttListener) wrapper; } final VerticalLayout layout = new VerticalLayout(); layout.setStyleName("demoContentLayout"); layout.setSizeFull(); //layout.addComponent(menu); layout.addComponent(controls); layout.addComponent(wrapper); layout.setExpandRatio(wrapper, 1); return layout; }
From source file:com.purebred.core.view.EntityForm.java
License:Open Source License
@PostConstruct @Override//from w w w.j a v a 2s . c o m public void postConstruct() { super.postConstruct(); addStyleName("p-entity-form"); List<ToManyRelationship> toManyRelationships = getViewableToManyRelationships(); if (toManyRelationships.size() > 0) { toManyRelationshipTabs = new TabSheet(); toManyRelationshipTabs.setSizeUndefined(); for (ToManyRelationship toManyRelationship : toManyRelationships) { toManyRelationshipTabs.addTab(toManyRelationship); labelDepot.putFieldLabel(getEntityType().getName(), toManyRelationship.getResults().getChildPropertyId(), "Relationship", toManyRelationship.getResults().getEntityCaption()); } Layout layout = new HorizontalLayout(); layout.setSizeUndefined(); Label label = new Label(" ", Label.CONTENT_XHTML); layout.addComponent(label); layout.addComponent(toManyRelationshipTabs); addComponent(layout); } }
From source file:com.purebred.core.view.FormComponent.java
License:Open Source License
private void initializeTabs(VerticalLayout layout) { final Set<String> tabNames = getFormFields().getTabNames(); tabSheet = new TabSheet(); tabSheet.addStyleName("borderless"); tabSheet.setSizeUndefined();/*from w ww .j a va 2s .com*/ int tabPosition = 0; for (String tabName : tabNames) { Label emptyLabel = new Label(); emptyLabel.setSizeUndefined(); tabSheet.addTab(emptyLabel, tabName, null); tabPositions.put(tabName, tabPosition++); } layout.addComponent(tabSheet); tabSheet.addListener(new TabSheet.SelectedTabChangeListener() { @Override public void selectedTabChange(TabSheet.SelectedTabChangeEvent event) { String tabName = getCurrentlySelectedTabName(); form.getLayout().removeAllComponents(); FormGridLayout gridLayout = (FormGridLayout) form.getLayout(); gridLayout.setFormColumns(getFormFields().getColumns(tabName)); gridLayout.setRows(getFormFields().getRows(tabName)); Set<FormField> formFields = getFormFields().getFormFields(tabName); for (FormField formField : formFields) { String propertyId = formField.getPropertyId(); Field field = formField.getField(); form.attachField(propertyId, field); } } }); }
From source file:com.rdonasco.security.user.views.UserEditorView.java
License:Apache License
public UserEditorView() { this.retypedPasswordField = new PasswordField(); this.passwordField = new PasswordField(); this.logonIdField = new TextField(); this.registrationTokenField = new TextField(); this.registrationTokenExpirationField = new DateField(); this.userDetailPanel = new Panel(); this.otherDetailTab = new TabSheet(); this.capabilitiesLayout = new HorizontalLayout(); this.rolesLayout = new HorizontalLayout(); this.groupsLayout = new HorizontalLayout(); this.buttonsLayout = new HorizontalLayout(); this.cancelButton = new Button(); this.saveButton = new Button(); this.editButton = new Button(); }
From source file:com.siemens.ct.osgi.vaadin.pm.main.MainApplication.java
License:Open Source License
@Override public void init() { logger.info("Dynamic Vaadin OSGi demo init..."); setTheme(Reindeer.THEME_NAME);//from ww w .ja v a 2s . c o m // setTheme(Runo.THEME_NAME); // setTheme("demo"); main = new Window("Dynamic Vaadin OSGi Demo"); mainLayout = (VerticalLayout) main.getContent(); mainLayout.setMargin(false); mainLayout.setStyleName("blue"); setMainWindow(main); mainLayout.setSizeFull(); mainLayout.addComponent(getMenu()); HorizontalLayout header = new HorizontalLayout(); header.addComponent(getHeader()); header.addComponent(getToolbar()); mainLayout.addComponent(header); CssLayout margin = new CssLayout(); margin.setMargin(false, true, true, true); margin.setSizeFull(); tabSheet = new TabSheet(); tabSheet.setSizeFull(); margin.addComponent(tabSheet); mainLayout.addComponent(margin); mainLayout.setExpandRatio(margin, 1); for (IViewContribution viewContribution : viewContributions) { tabSheet.addTab(viewContribution.getView(this), viewContribution.getName(), new ThemeResource(viewContribution.getIcon())); } for (IActionContribution actionContribution : actionContributions) { addActionContribution(actionContribution); } // Create the indicator // this is used for a simple poll mechanism // so that manual server-side starting/stopping of bundles has a direct // effect on the client UI ProgressIndicator indicator = new ProgressIndicator(); // Set polling frequency to 1 seconds. indicator.setPollingInterval(1000); // Add it to Application's main window main.addComponent(indicator); // Hide the component does not work... indicator.setWidth("1px"); indicator.setHeight("1px"); indicator.setVisible(true); initialized = true; }
From source file:com.skysql.manager.ui.TabbedPanel.java
License:Open Source License
/** * Instantiates a new tabbed panel.//from w w w. ja v a 2 s . c o m * * @param session the session */ public TabbedPanel(VaadinSession session) { this.session = session; // Set another root layout for the middle panels section. tabsheet = new TabSheet(); tabsheet.setImmediate(true); tabsheet.setSizeFull(); // INFO TAB panelInfo = new PanelInfo(); tabsheet.addTab(panelInfo).setCaption("Info"); currentTab = panelInfo; // CONTROL TAB panelControl = new PanelControl(); tabsheet.addTab(panelControl).setCaption("Control"); // BACKUP TAB panelBackup = new PanelBackup(); panelBackup.setImmediate(true); tabsheet.addTab(panelBackup).setCaption("Backups"); // TOOLS TAB // SystemInfo systemInfo = session.getAttribute(SystemInfo.class); // LinkedHashMap<String, String> properties = systemInfo.getCurrentSystem().getProperties(); // String EIP = properties.get(SystemInfo.PROPERTY_EIP); // String MONyog = properties.get(SystemInfo.PROPERTY_MONYOG); // String phpUrl = properties.get(SystemInfo.PROPERTY_PHPMYADMIN); // if ((EIP != null && MONyog != null) || phpUrl != null) { // panelTools = new PanelTools(); // panelTools.setImmediate(true); // tabsheet.addTab(panelTools).setCaption("Tools"); // } // ADD LISTENERS TO TABS tabsheet.addSelectedTabChangeListener(new TabSheet.SelectedTabChangeListener() { public void selectedTabChange(SelectedTabChangeEvent event) { final TabSheet source = (TabSheet) event.getSource(); if (source == tabsheet) { Component selectedTab = source.getSelectedTab(); if (selectedTab != currentTab) { if (currentTab instanceof PanelInfo) { ((PanelInfo) currentTab).stopRefresh(); } currentTab = selectedTab; refresh(); } } } }); }
From source file:com.snowy.ChatWindow.java
public ChatWindow(data d) { this.d = d;//from w ww . ja v a2s . c om ul = new UsersList(d); tabMain = new TabSheet(); tabChats = new TabSheet(); //tabChats.addTab(); //tabChats. ht.put(0, new Chat(0, d)); tabChats.addTab(ht.get(0), "Main Lobby"); tabChats.setSizeFull(); tabMain.addTab(tabChats, "Chat"); tabMain.addTab(ul, "Users"); tabMain.setSizeFull(); //tabChats.setImmediate(true); this.setContent(tabMain); }
From source file:com.snowy.GameWindow.java
public GameWindow(data d) { this.d = d;/* ww w . j av a2 s . c o m*/ rq = new Requests(d); games = new TabSheet(); main = new TabSheet(); games.addSelectedTabChangeListener(e -> { ((Game) e.getTabSheet().getSelectedTab()).rendered = false; }); main.addSelectedTabChangeListener(e -> { if (!e.getTabSheet().getSelectedTab().equals(games)) { //((Game)games.getSelectedTab()).rendered=false; games.iterator().forEachRemaining(s -> { //Logger.getLogger(GameWindow.class.getName()).info(s.toString()); ((Game) s).rendered = false; }); } }); main.setSizeFull(); games.setSizeFull(); main.addTab(rq, "Requests"); main.addTab(games, "Games"); setContent(main); }
From source file:com.terralcode.frontend.vista.widgets.alumno.AlumnoVista.java
private FormLayout buildLayout() { mainLayout = new FormLayout(); mainLayout.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); mainLayout.setMargin(new MarginInfo(true, false, false, false)); buildDatosAlumno();/*from ww w . j a v a 2 s . c o m*/ tabDatos = new TabSheet(); mainLayout.addComponent(tabDatos); buildDatosAlumnoExtras(); buildEmpresaTab(); buildDireccion(); buildEstudiosTab(); buildAyudasTab(); return mainLayout; }