List of usage examples for com.vaadin.ui TabSheet setSizeFull
@Override public void setSizeFull()
From source file:com.pms.component.ganttchart.scheduletask.TaskGanntChart.java
License:Apache License
public Component init(Project project) { this.project = project; ganttListener = null;/*from w w w . 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.ganttchart.scheduletask.UserStoryGanntChart.java
License:Apache License
public Component init(Project project) { this.project = project; ganttListener = null;/*www . j a v a 2 s .c om*/ 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 w w w .ja v a 2 s . c o 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:de.datenhahn.vaadin.componentrenderer.demo.ComponentRendererDemoUI.java
License:Apache License
private void startDemoApp() { layout.setSizeFull();/* ww w . j a v a 2 s . c o m*/ layout.setMargin(true); layout.setSpacing(true); addHeader(); TabSheet tabSheet = new TabSheet(); tabSheet.setSizeFull(); layout.addComponent(tabSheet); tabSheet.addTab(new ClassicGridTab(), "Classic Grid"); tabSheet.addTab(new ClassicGridWithDecoratorTab(), "Classic Grid with Decorator"); tabSheet.addTab(new ComponentGridTab(), "Typed Component Grid"); tabSheet.addTab(new ViritinMGridTab(), "Viritin MGrid"); tabSheet.addTab(new NotABeanGridWithDecoratorTab(), "Not a bean grid"); tabSheet.addTab(new ClassicGridWithStaticContainerTab(), "Classic Grid with Static Container"); layout.setExpandRatio(tabSheet, 1.0f); setContent(layout); }
From source file:de.mendelson.comm.as2.webclient2.TransactionDetailsDialog.java
private TabSheet createTabSheet() { TabSheet tabsheet = new TabSheet(); this.logPanel = this.createLogTab(); tabsheet.addTab(this.logPanel, "Log", null); this.rawMessageDecryptedPanel = this.createRawMessageDecryptedPanel(); tabsheet.addTab(rawMessageDecryptedPanel, "Raw message decrypted", null); this.messageHeaderPanel = this.createMessageHeaderPanel(); tabsheet.addTab(this.messageHeaderPanel, "Message header", null); this.payloadPanel = this.createPayloadPanel(); for (int i = 0; i < this.payloadPanel.length; i++) { String tabTitle = "Payload"; if (this.payloadPanel.length > 1) { tabTitle += " " + (i + 1); }//from w ww . j ava 2 s . co m tabsheet.addTab(this.payloadPanel[i], tabTitle, null); } tabsheet.setSizeFull(); return (tabsheet); }
From source file:edu.nps.moves.mmowgli.modules.actionplans.MediaSubWindow.java
License:Open Source License
public MediaSubWindow(Resource res) { setCaption("Action Plan Image"); setModal(true);//from w w w. j a v a 2s . c om setWidth("640px"); setHeight("480px"); TabSheet tabs = new TabSheet(); tabs.setSizeFull(); setContent(tabs); Panel pan = new Panel(); tabs.addTab(pan, "Fit Window"); pan.setSizeFull(); VerticalLayout layout = new VerticalLayout(); pan.setContent(layout); layout.setSizeFull(); layout.addStyleName("m-background-lightgrey"); layout.setMargin(false); image = new ScaleImage(); image.setSizeFull(); image.setSource(res); layout.addComponent(image); layout.setComponentAlignment(image, Alignment.MIDDLE_CENTER); layout.setExpandRatio(image, 1.0f); tabs.addTab(buildNestedImage(res), "Actual Size"); }
From source file:eu.eco2clouds.portal.page.ExperimentLayout.java
License:Apache License
public void render() { TabSheet tabSheet = new TabSheet(); tabSheet.setSizeFull(); /* sheet on experiment details*/ VerticalLayout detailsSheet = new VerticalLayout(); detailsSheet.setSpacing(true);/*from w w w. j a va 2 s .c om*/ detailsSheet.setMargin(true); detailsSheet.setSizeFull(); detailsSheet.addComponent(new ExperimentDetails(experiment)); detailsSheet.addComponent(new ResourceTable()); /* sheet reporting experiment energy */ VerticalLayout ecoReportSheet = new VerticalLayout(); ecoReportSheet.setSpacing(true); ecoReportSheet.setMargin(false); ecoReportSheet.setSizeFull(); ecoReportSheet.addComponent(new EcoReport()); /* sheet reporting adaptation actions */ VerticalLayout adaptationActionSheet = new VerticalLayout(); adaptationActionSheet.setSpacing(true); adaptationActionSheet.setMargin(false); adaptationActionSheet.setSizeFull(); adaptationActionSheet.addComponent(new AdaptationReport()); /* sheet reporting experiment energy */ /*VerticalLayout recommendationReportSheet = new VerticalLayout(); recommendationReportSheet.setSpacing(true); recommendationReportSheet.setMargin(false); recommendationReportSheet.setSizeFull(); recommendationReportSheet.addComponent(new RecommendationReport());*/ tabSheet.setStyleName(Reindeer.TABSHEET_MINIMAL); tabSheet.addTab(detailsSheet, "Details"); tabSheet.addTab(ecoReportSheet, "Eco Report"); tabSheet.addTab(adaptationActionSheet, "Adaptation Report"); //tabSheet.addTab(recommendationReportSheet, "Recommendation Report"); this.addComponent(tabSheet); Label space = new Label(""); this.addComponent(space); Label version = new Label("<hr/>ECO2Clouds Portal v." + E2CPortal.VERSION + " - (c) ECO2Clouds project 2012-2014 (<a href='http://www.eco2clouds.eu' target='_blank'>http://www.eco2clouds.eu</a>)", ContentMode.HTML); this.addComponent(version); this.setExpandRatio(tabSheet, 2.0f); }
From source file:fr.univlorraine.mondossierweb.views.EtatCivilView.java
License:Apache License
/** * Initialise la vue/*w w w.j a va 2 s . c om*/ */ @PostConstruct public void init() { LOG.debug(userController.getCurrentUserName() + " EtatCivilView"); //On vrifie le droit d'accder la vue if (UI.getCurrent() instanceof MainUI && (userController.isEnseignant() || userController.isEtudiant())) { if (MainUI.getCurrent() != null && MainUI.getCurrent().getEtudiant() != null) { LOG.debug(userController.getCurrentUserName() + " init EtatCivilView"); /* Style */ setMargin(true); setSpacing(true); /* Titre */ Label title = new Label(applicationContext.getMessage(NAME + ".title", null, getLocale())); title.addStyleName(ValoTheme.LABEL_H1); addComponent(title); VerticalLayout globalLayout = new VerticalLayout(); globalLayout.setSizeFull(); globalLayout.setSpacing(true); //Layout avec les infos etatcivil et contact CssLayout idLayout = new CssLayout(); idLayout.setSizeFull(); idLayout.setStyleName("flexwrap"); globalLayout.addComponent(idLayout); // Enable Responsive CSS selectors for the layout Responsive.makeResponsive(idLayout); /* Generalites */ FormLayout formGeneralitesLayout = new FormLayout(); formGeneralitesLayout.setSpacing(true); formGeneralitesLayout.setMargin(true); Panel panelGeneralites = new Panel( applicationContext.getMessage(NAME + ".generalites.title", null, getLocale())); String captionNumDossier = applicationContext.getMessage(NAME + ".numdossier.title", null, getLocale()); Label fieldNumDossier = new Label(); formatLabel(fieldNumDossier, captionNumDossier, MainUI.getCurrent().getEtudiant().getCod_etu()); formGeneralitesLayout.addComponent(fieldNumDossier); String captionNNE = applicationContext.getMessage(NAME + ".nne.title", null, getLocale()); Label fieldNNE = new Label(); formatLabel(fieldNNE, captionNNE, MainUI.getCurrent().getEtudiant().getCod_nne()); formGeneralitesLayout.addComponent(fieldNNE); String captionNom = applicationContext.getMessage(NAME + ".nom.title", null, getLocale()); Label fieldNom = new Label(); formatLabel(fieldNom, captionNom, MainUI.getCurrent().getEtudiant().getNom()); formGeneralitesLayout.addComponent(fieldNom); String captionMail = applicationContext.getMessage(NAME + ".mail.title", null, getLocale()); Label mailLabel = new Label(); mailLabel.setCaption(captionMail); String mail = MainUI.getCurrent().getEtudiant().getEmail(); if (StringUtils.hasText(mail)) { mail = "<a href=\"mailto:" + mail + "\">" + mail + "</a>"; mailLabel.setValue(mail); mailLabel.setContentMode(ContentMode.HTML); } mailLabel.setSizeFull(); formGeneralitesLayout.addComponent(mailLabel); String captionNationalite = applicationContext.getMessage(NAME + ".nationalite.title", null, getLocale()); Label fieldNationalite = new Label(); formatLabel(fieldNationalite, captionNationalite, MainUI.getCurrent().getEtudiant().getNationalite()); formGeneralitesLayout.addComponent(fieldNationalite); String captionDateNaissance = applicationContext.getMessage(NAME + ".naissance.title", null, getLocale()); Label fieldDateNaissance = new Label(); formatLabel(fieldDateNaissance, captionDateNaissance, MainUI.getCurrent().getEtudiant().getDatenaissance()); formGeneralitesLayout.addComponent(fieldDateNaissance); String captionLieuNaissance = applicationContext.getMessage(NAME + ".lieunaissance.title", null, getLocale()); Label fieldLieuNaissance = new Label(); formatLabel(fieldLieuNaissance, captionLieuNaissance, MainUI.getCurrent().getEtudiant().getLieunaissance()); formGeneralitesLayout.addComponent(fieldLieuNaissance); String captionDepNaissance = applicationContext.getMessage(NAME + ".depnaissance.title", null, getLocale()); Label fieldDepNaissance = new Label(); formatLabel(fieldDepNaissance, captionDepNaissance, MainUI.getCurrent().getEtudiant().getDepartementnaissance()); formGeneralitesLayout.addComponent(fieldDepNaissance); panelGeneralites.setContent(formGeneralitesLayout); HorizontalLayout generalitesGlobalLayout = new HorizontalLayout(); generalitesGlobalLayout.setSizeUndefined(); generalitesGlobalLayout.setStyleName("firstitembox"); generalitesGlobalLayout.addComponent(panelGeneralites); generalitesGlobalLayout.setExpandRatio(panelGeneralites, 1); idLayout.addComponent(generalitesGlobalLayout); /* Bac */ Panel panelBac = new Panel(applicationContext.getMessage(NAME + ".bac.title", null, getLocale())); //Si plusieurs bac if (MainUI.getCurrent().getEtudiant().getListeBac() != null && MainUI.getCurrent().getEtudiant().getListeBac().size() > 1) { panelBac.setCaption(applicationContext.getMessage(NAME + ".bacs.title", null, getLocale())); TabSheet bacTabSheet = new TabSheet(); VerticalLayout vBacLayout = new VerticalLayout(); vBacLayout.setSizeFull(); bacTabSheet.setSizeFull(); bacTabSheet.addStyleName(ValoTheme.TABSHEET_FRAMED); for (BacEtatCivil bec : MainUI.getCurrent().getEtudiant().getListeBac()) { FormLayout tabBacLayout = new FormLayout(); tabBacLayout.setSizeFull(); tabBacLayout.setMargin(false); ajouterBacToView(tabBacLayout, bec); bacTabSheet.addTab(tabBacLayout, bec.getCod_bac(), FontAwesome.GRADUATION_CAP); } vBacLayout.addComponent(bacTabSheet); panelBac.setContent(vBacLayout); } else { //Si un seul bac FormLayout formBacLayout = new FormLayout(); formBacLayout.setSizeFull(); if (MainUI.getCurrent().getEtudiant().getListeBac() != null && MainUI.getCurrent().getEtudiant().getListeBac().size() == 1) { formBacLayout.setSpacing(true); formBacLayout.setMargin(true); ajouterBacToView(formBacLayout, MainUI.getCurrent().getEtudiant().getListeBac().get(0)); } panelBac.setContent(formBacLayout); } HorizontalLayout bacGlobalLayout = new HorizontalLayout(); bacGlobalLayout.setSizeUndefined(); bacGlobalLayout.setStyleName("itembox"); bacGlobalLayout.addComponent(panelBac); bacGlobalLayout.setExpandRatio(panelBac, 1); idLayout.addComponent(bacGlobalLayout); /* Info de contact */ panelContact = new Panel(applicationContext.getMessage(NAME + ".contact.title", null, getLocale())); renseignerPanelContact(); globalLayout.addComponent(panelContact); addComponent(globalLayout); } else { /* Erreur */ addComponent(new BasicErreurMessageLayout(applicationContext)); } } }
From source file:io.subutai.plugin.accumulo.ui.AccumuloComponent.java
public AccumuloComponent(ExecutorService executorService, Accumulo accumulo, Hadoop hadoop, Zookeeper zookeeper, Tracker tracker, EnvironmentManager environmentManager) throws NamingException { setSizeFull();//from w ww. j a v a 2 s .c o m VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setSpacing(true); verticalLayout.setSizeFull(); TabSheet sheet = new TabSheet(); sheet.setSizeFull(); final Manager manager = new Manager(executorService, accumulo, hadoop, zookeeper, tracker, environmentManager); Wizard wizard = new Wizard(executorService, accumulo, hadoop, zookeeper, tracker, environmentManager); sheet.addTab(wizard.getContent(), "Install"); sheet.getTab(0).setId("AccumuloInstallTab"); sheet.addTab(manager.getContent(), "Manage"); sheet.getTab(1).setId("AccumuloManageTab"); sheet.addSelectedTabChangeListener(new TabSheet.SelectedTabChangeListener() { @Override public void selectedTabChange(TabSheet.SelectedTabChangeEvent event) { TabSheet tabsheet = event.getTabSheet(); String caption = tabsheet.getTab(event.getTabSheet().getSelectedTab()).getCaption(); if (caption.equals("Manage")) { manager.refreshClustersInfo(); } } }); verticalLayout.addComponent(sheet); setCompositionRoot(verticalLayout); manager.refreshClustersInfo(); }
From source file:org.accelerators.activiti.admin.ui.MainView.java
License:Open Source License
public MainView(AdminApp application) { // Set application this.app = application; // Setup main layout setStyleName(Reindeer.LAYOUT_WHITE); setMargin(false);/*from w ww. j ava 2s . co m*/ setSpacing(false); setSizeFull(); // Add header GridLayout header = new GridLayout(2, 1); header.setWidth("100%"); header.setHeight("34px"); addComponent(header); // Add header styles header.addStyleName(Consts.HEADER); header.addStyleName("header"); header.setSpacing(true); // Add title to header GridLayout logoGrid = new GridLayout(1, 1); header.addComponent(logoGrid, 0, 0); header.setComponentAlignment(logoGrid, Alignment.MIDDLE_LEFT); Embedded logoImage = new Embedded(null, new ThemeResource("img/header-logo.png")); logoImage.setType(Embedded.TYPE_IMAGE); logoImage.addStyleName("header-image"); logoGrid.addComponent(logoImage, 0, 0); logoGrid.setComponentAlignment(logoImage, Alignment.MIDDLE_CENTER); // Add logout button to header GridLayout logoutGrid = new GridLayout(2, 1); Label userLabel = new Label("Signed in as: " + app.getUser().toString()); userLabel.addStyleName("user"); logout.setStyleName(Reindeer.BUTTON_LINK); logout.addStyleName("logout"); logoutGrid.addComponent(userLabel, 0, 0); logoutGrid.addComponent(logout, 1, 0); header.addComponent(logoutGrid, 1, 0); header.setComponentAlignment(logoutGrid, Alignment.TOP_RIGHT); // Create tab sheet TabSheet tabs = new TabSheet(); tabs.setSizeFull(); // Add tab styles tabs.addStyleName(Reindeer.TABSHEET_BORDERLESS); tabs.addStyleName(Reindeer.LAYOUT_WHITE); // Add task view tab tabs.addTab(new UserTab(app)); tabs.addTab(new GroupTab(app)); // Add tab sheet to layout addComponent(tabs); setExpandRatio(tabs, 1.0F); // Add footer text Label footerText = new Label(app.getMessage(Messages.Footer)); footerText.setSizeUndefined(); footerText.setStyleName(Reindeer.LABEL_SMALL); addComponent(footerText); setComponentAlignment(footerText, Alignment.BOTTOM_CENTER); }