Example usage for com.vaadin.ui TabSheet setCaption

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

Introduction

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

Prototype

@Override
    public void setCaption(String caption) 

Source Link

Usage

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

License:Open Source License

/**
 * for both graphs//from   w w  w.  j  ava 2s  .  com
 * 
 * @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

/**
 * for both graphs//from  ww  w  .j  a  va 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.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;
}