Example usage for com.vaadin.ui TabSheet TabSheet

List of usage examples for com.vaadin.ui TabSheet TabSheet

Introduction

In this page you can find the example usage for com.vaadin.ui TabSheet TabSheet.

Prototype

public TabSheet() 

Source Link

Document

Constructs a new TabSheet.

Usage

From source file:de.datenhahn.vaadin.componentrenderer.demo.ComponentRendererDemoUI.java

License:Apache License

private void startDemoApp() {
    layout.setSizeFull();//from w  w  w.jav  a  2s  .  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.fatalix.bookery.view.admin.AdminView.java

License:Open Source License

@PostConstruct
private void postInit() {
    TabSheet tabSheet = new TabSheet();
    tabSheet.setStyleName("admin-screen");
    tabSheet.addTab(createServerSettings(), "Server Settings");
    tabSheet.addTab(createUserManagement(), "User Management");
    tabSheet.addTab(batchJobsLayout, "Batch Jobs");
    this.setCompositionRoot(tabSheet);
}

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  w  w.j  a v  a2s  . com
        tabsheet.addTab(this.payloadPanel[i], tabTitle, null);
    }
    tabsheet.setSizeFull();
    return (tabsheet);
}

From source file:de.unioninvestment.eai.portal.portlet.crud.mvp.views.configuration.DefaultPortletConfigurationView.java

License:Apache License

/**
 * Konstruktor fr die View der Portletkonfigurationsseite.
 *///from  ww w .j  a v  a 2s . co m
public DefaultPortletConfigurationView() {
    tabsheet = new TabSheet();

    VerticalLayout statusLayout = createStatusLayout();
    tabsheet.addComponent(statusLayout);

    addComponent(tabsheet);
}

From source file:de.uni_leipzig.informatik.pcai042.boa.gui.evaluation.EvaluationView.java

License:Open Source License

/**
 * Constructor initializes View.//  ww  w.  jav  a  2 s .  com
 */
public EvaluationView() {
    this.setSizeFull();

    // buildMainLayout

    // Tab 1 content
    //      tab1 = new VerticalLayout();
    //      tab1.setMargin(true);
    //      tab1.addComponent(buildTab1Content());

    // Tab 2 content
    tab2 = new VerticalLayout();
    tab2.setMargin(true);
    tab2.addComponent(buildTab2Content());

    // Tab 3 content
    tab3 = new VerticalLayout();
    tab3.setMargin(true);
    tab3.addComponent(buildTab3Content());

    tabsheet = new TabSheet();
    // tabsheet.setSizeFull();
    //      tabsheet.addTab(tab1, "Home");
    tabsheet.addTab(tab2, "Annotation");
    tabsheet.addTab(tab3, "Evaluation");

    // reset to default status
    this.resetComponents();

    this.addComponent(tabsheet);
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.ExperimentView.java

License:Open Source License

/**
 * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment
 * Table Graph//from   w  w w.  j  a v  a2 s. c  o  m
 */
void initView() {
    setWidth(100, Unit.PERCENTAGE);
    setResponsive(true);

    expview_content = new VerticalLayout();
    expview_content.setResponsive(true);
    expview_content.setMargin(new MarginInfo(true, true, false, false));

    expview_tab = new TabSheet();
    expview_tab.setWidth(100, Unit.PERCENTAGE);
    expview_tab.setResponsive(true);

    expview_tab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS);
    expview_tab.addStyleName(ValoTheme.TABSHEET_FRAMED);
    expview_tab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

    expview_content.addComponent(expview_tab);

    expview_tab.addTab(initDescription(), "General Information").setIcon(FontAwesome.INFO_CIRCLE);
    // expview_tab.addTab(initStatistics(), "Statistics").setIcon(FontAwesome.CHECK_CIRCLE);
    expview_tab.addTab(initProperties(), "Metadata").setIcon(FontAwesome.LIST_UL);
    expview_tab.addTab(initTable(), "Samples").setIcon(FontAwesome.TINT);
    initNoteComponent();
    expview_tab.addTab(innerNotesComponent).setIcon(FontAwesome.PENCIL);

    expview_content.setWidth(100, Unit.PERCENTAGE);
    this.addComponent(expview_content);
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.PatientView.java

License:Open Source License

/**
 * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment
 * Table Graph//from   www.  ja  va2  s . com
 */
void initView() {
    patientViewContent = new VerticalLayout();
    patientViewContent.setMargin(new MarginInfo(true, false, false, false));
    // patientViewContent.setMargin(true);

    headerLabel = "";

    patientViewTab = new TabSheet();
    patientViewTab.setHeight("100%");
    patientViewTab.setWidth("100%");

    datasetComponent = new DatasetComponent(datahandler, state, resourceUrl);
    biologicalSamplesComponent = new BiologicalSamplesComponent(datahandler, state, resourceUrl,
            "Biological Samples");
    measuredSamplesComponent = new LevelComponent(datahandler, state, resourceUrl, "Raw Data");
    resultsComponent = new LevelComponent(datahandler, state, resourceUrl, "Results");
    statusComponent = new PatientStatusComponent(datahandler, state, resourceUrl);
    workflowComponent = new WorkflowComponent(wfController);
    uploadComponent = new AttachmentUploadComponent();
    projectInformation = new ProjInformationComponent(datahandler, state, resourceUrl);
    experimentComponent = new ExperimentComponent(datahandler, state, resourceUrl);

    patientViewTab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS);
    patientViewTab.addStyleName(ValoTheme.TABSHEET_FRAMED);
    patientViewTab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

    // patientViewTab.addTab(initDescription()).setIcon(FontAwesome.INFO_CIRCLE);
    patientViewTab.addTab(projectInformation).setIcon(FontAwesome.INFO_CIRCLE);
    patientViewTab.addTab(statusComponent).setIcon(FontAwesome.CHECK_CIRCLE);
    patientViewTab.addTab(initGraphs()).setIcon(FontAwesome.SITEMAP);
    // patientViewTab.addTab(initMemberSection()).setIcon(FontAwesome.USERS);
    // patientViewTab.addTab(initHLALayout()).setIcon(FontAwesome.BARCODE);
    // patientViewTab.addTab(initTable()).setIcon(FontAwesome.FLASK);

    patientViewTab.addTab(experimentComponent).setIcon(FontAwesome.FLASK);
    patientViewTab.addTab(datasetComponent).setIcon(FontAwesome.DATABASE);
    patientViewTab.addTab(biologicalSamplesComponent).setIcon(FontAwesome.TINT);
    patientViewTab.addTab(measuredSamplesComponent).setIcon(FontAwesome.SIGNAL);
    patientViewTab.addTab(resultsComponent).setIcon(FontAwesome.TH_LARGE);
    patientViewTab.addTab(workflowComponent).setIcon(FontAwesome.COGS);
    patientViewTab.addTab(uploadComponent).setIcon(FontAwesome.UPLOAD);

    patientViewTab.setImmediate(true);

    patientViewTab.addSelectedTabChangeListener(new SelectedTabChangeListener() {

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            TabSheet tab = (TabSheet) event.getSource();

            if (event.getTabSheet().getSelectedTab().getCaption().equals("Project Graph")) {
                loadGraph();
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Exp. Steps")) {
                experimentComponent.updateUI(getCurrentBean());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Datasets")) {
                datasetComponent.updateUI("project", getCurrentBean().getId());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Raw Data")) {
                measuredSamplesComponent.updateUI("project", getCurrentBean().getId(), "measured");
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Biological Samples")) {
                biologicalSamplesComponent.updateUI(getCurrentBean().getId());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Results")) {
                resultsComponent.updateUI("project", getCurrentBean().getId(), "results");
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Status")) {
                statusComponent.updateUI(getCurrentBean());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Workflows")) {
                Map<String, String> args = new HashMap<String, String>();
                args.put("id", getCurrentBean().getId());
                args.put("type", "project");
                workflowComponent.update(args);
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Upload Files")) {
                // (get space from currentBean)
                uploadComponent.updateUI(manager, getCurrentBean().getCode(), currentBean.getId().split("/")[1],
                        datahandler.getOpenBisClient());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("")) {
                projectInformation.updateUI(getCurrentBean(), "patient");
            }
        }
    });

    patientViewContent.addComponent(patientViewTab);
    this.addComponent(patientViewContent);

}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.PatientView.java

License:Open Source License

/**
 * for both graphs// w ww.  j av  a 2 s.  c o  m
 * 
 * @return the tablayout containing both graphs
 */
Component initGraphs() {
    TabSheet graphTab = new TabSheet();
    graphTab.setCaption("Project Graph");

    VerticalLayout graphSection = new VerticalLayout();
    graphSectionContent = new VerticalLayout();

    graphSection.setCaption("Project Graph");

    graphSectionContent.setMargin(new MarginInfo(true, false, true, true));
    // graphSection.setMargin(new MarginInfo(true, false, true, true));
    graphSection.setMargin(true);
    graphSection.setSpacing(true);
    graphSection.setWidth("100%");
    graphSectionContent.setWidth("100%");

    OpenBisClient openbis = datahandler.getOpenBisClient();
    Map<String, String> taxMap = openbis.getVocabCodesAndLabelsForVocab("Q_NCBI_TAXONOMY");
    Map<String, String> tissueMap = openbis.getVocabCodesAndLabelsForVocab("Q_PRIMARY_TISSUES");
    newGraphContent = new GraphPage(taxMap, tissueMap);

    graphSection.addComponent(graphSectionContent);
    graphTab.addTab(graphSection, "Sample Graph");
    graphTab.addTab(newGraphContent, "Sample Graph v2 (beta)");
    return graphTab;
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.ProjectView.java

License:Open Source License

/**
 * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment
 * Table Graph/*from   ww w .j  ava  2 s  .co m*/
 */
void initView() {
    projectview_content = new VerticalLayout();
    projectview_content.setMargin(new MarginInfo(true, false, false, false));

    // labelContent = new VerticalLayout();
    // labelContent.setMargin(new MarginInfo(true, false, true, false));

    headerLabel = "";

    // labelContent.addComponent(headerLabel);
    // projectview_content.addComponent(labelContent);

    projectview_tab = new TabSheet();
    projectview_tab.setWidth("100%");
    projectview_tab.setHeight("100%");

    datasetComponent = new DatasetComponent(datahandler, state, resourceUrl);
    biologicalSamplesComponent = new BiologicalSamplesComponent(datahandler, state, resourceUrl,
            "Biological Samples");
    measuredSamplesComponent = new LevelComponent(datahandler, state, resourceUrl, "Raw Data");
    resultsComponent = new LevelComponent(datahandler, state, resourceUrl, "Results");
    workflowComponent = new WorkflowComponent(wfController);
    uploadComponent = new AttachmentUploadComponent();
    projectInformation = new ProjInformationComponent(datahandler, state, resourceUrl);
    experimentComponent = new ExperimentComponent(datahandler, state, resourceUrl);

    // add styles to tab sheet
    projectview_tab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS);
    projectview_tab.addStyleName(ValoTheme.TABSHEET_FRAMED);
    // projectview_tab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

    // add tabs to tabsheet
    projectview_tab.addTab(projectInformation).setIcon(FontAwesome.INFO_CIRCLE);
    projectview_tab.addTab(initGraphs()).setIcon(FontAwesome.SITEMAP);
    // projectview_tab.addTab(initMemberSection()).setIcon(FontAwesome.USERS);

    projectview_tab.addTab(experimentComponent).setIcon(FontAwesome.FLASK);
    projectview_tab.addTab(datasetComponent).setIcon(FontAwesome.DATABASE);
    projectview_tab.addTab(biologicalSamplesComponent).setIcon(FontAwesome.TINT);
    projectview_tab.addTab(measuredSamplesComponent).setIcon(FontAwesome.SIGNAL);
    projectview_tab.addTab(resultsComponent).setIcon(FontAwesome.TH_LARGE);
    projectview_tab.addTab(workflowComponent).setIcon(FontAwesome.COGS);
    projectview_tab.addTab(uploadComponent).setIcon(FontAwesome.UPLOAD);

    projectview_tab.setImmediate(true);

    projectview_tab.addSelectedTabChangeListener(new SelectedTabChangeListener() {

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            if (event.getTabSheet().getSelectedTab().getCaption().equals("Project Graph")) {
                loadGraph();
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Exp. Steps")) {
                experimentComponent.updateUI(getCurrentBean());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Datasets")) {
                datasetComponent.updateUI(navigateToLabel, getCurrentBean().getId());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Raw Data")) {
                measuredSamplesComponent.updateUI(navigateToLabel, getCurrentBean().getId(), "measured");
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Biological Samples")) {
                biologicalSamplesComponent.updateUI(getCurrentBean().getId());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Results")) {
                resultsComponent.updateUI(navigateToLabel, getCurrentBean().getId(), "results");
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Workflows")) {
                Map<String, String> args = new HashMap<String, String>();
                args.put("id", getCurrentBean().getId());
                args.put("type", navigateToLabel);
                workflowComponent.update(args);
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Upload Files")) {
                // (get space from currentBean)
                uploadComponent.updateUI(manager, getCurrentBean().getCode(), currentBean.getId().split("/")[1],
                        datahandler.getOpenBisClient());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("")) {
                projectInformation.updateUI(getCurrentBean(), "project");
            }
        }
    });

    // projectview_content.addComponent(initMenuBar());
    projectview_content.addComponent(projectview_tab);
    // projectview_content.addComponent(initDescription());
    // projectview_content.addComponent(initStatistics());
    // projectview_content.addComponent(initTable());
    // projectview_content.addComponent(initButtonLayout());

    // projectview_content.addComponent(initGraph());

    // use the component that is returned by initTable
    // projectview_content.setComponentAlignment(this.table, Alignment.TOP_CENTER);
    // projectview_content.setWidth("100%");
    this.addComponent(projectview_content);
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.ProjectView.java

License:Open Source License

/**
 * for both graphs//  w  w  w .  j a  v  a  2 s .  c om
 * 
 * @return the tablayout containing both graphs
 */
Component initGraphs() {
    TabSheet graphTab = new TabSheet();
    graphTab.setCaption("Project Graph");

    VerticalLayout graphSection = new VerticalLayout();
    graphSectionContent = new VerticalLayout();

    graphSection.setCaption("Project Graph");

    graphSectionContent.setMargin(new MarginInfo(true, false, true, true));
    graphSection.setMargin(new MarginInfo(true, false, true, true));
    graphSection.setWidth("100%");
    graphSectionContent.setWidth("100%");

    OpenBisClient openbis = datahandler.getOpenBisClient();
    Map<String, String> taxMap = openbis.getVocabCodesAndLabelsForVocab("Q_NCBI_TAXONOMY");
    Map<String, String> tissueMap = openbis.getVocabCodesAndLabelsForVocab("Q_PRIMARY_TISSUES");
    newGraphContent = new GraphPage(taxMap, tissueMap);

    graphSection.addComponent(graphSectionContent);
    graphTab.addTab(graphSection, "Sample Graph");
    graphTab.addTab(newGraphContent, "Sample Graph v2 (beta)");
    return graphTab;
}