Example usage for com.vaadin.ui VerticalLayout setCaption

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

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalLayout 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

/**
 * /*  w  w w  .j ava2 s . c om*/
 * @param statusValues
 * @return
 */
public VerticalLayout initProjectStatus() {
    status = new VerticalLayout();
    status.setWidth(100.0f, Unit.PERCENTAGE);

    status.setMargin(new MarginInfo(true, false, true, true));
    status.setSpacing(true);
    // status.setCaption("Project Status");
    // status.setIcon(FontAwesome.CHECK_SQUARE);
    status.setSizeFull();

    VerticalLayout projectStatus = new VerticalLayout();
    projectStatus.setCaption("Status");
    projectStatus.setMargin(new MarginInfo(true, false, true, true));
    projectStatus.setSpacing(true);

    experiments = new Grid();
    experiments.setReadOnly(true);
    experiments.setWidth(100.0f, Unit.PERCENTAGE);
    status.addComponent(experiments);

    ProgressBar progressBar = new ProgressBar();
    progressBar.setValue(0f);
    status.addComponent(progressBar);

    projectStatus.addComponent(status);

    return projectStatus;
}

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

License:Open Source License

/**
 * //from  www  .  j  a  v  a 2s .c o m
 * @return
 */
VerticalLayout initGraph() {
    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%");

    graphSection.addComponent(graphSectionContent);
    return graphSection;
}

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

License:Open Source License

/**
 * for both graphs/*from   w ww . jav 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

/**
 * initializes the description layout/*from  w  ww.  j av a2 s .c  o m*/
 * 
 * @return
 */
VerticalLayout initDescription() {
    VerticalLayout projDescription = new VerticalLayout();
    projDescriptionContent = new VerticalLayout();

    projDescription.setCaption("");

    // String desc = currentBean.getDescription();
    // if (!desc.isEmpty()) {
    // descContent.setValue(desc);
    // }
    descContent = new Label("");
    // contact.setValue("<a
    // href=\"mailto:info@qbic.uni-tuebingen.de?subject=Question%20concerning%20project%20"
    // + currentBean.getId()
    // + "\" style=\"color: #0068AA; text-decoration: none\">Send question regarding project "
    // + currentBean.getId() + "</a>");
    contact = new Label("", ContentMode.HTML);
    projDescriptionContent.addComponent(descContent);
    projDescriptionContent.addComponent(contact);
    projDescriptionContent.setMargin(new MarginInfo(true, false, true, true));
    // projDescriptionContent.setCaption("Description");
    // projDescriptionContent.setIcon(FontAwesome.FILE_TEXT_O);

    projDescription.addComponent(projDescriptionContent);
    projDescriptionContent.setSpacing(true);
    projDescription.setMargin(new MarginInfo(true, false, true, true));
    projDescription.setWidth("100%");
    projDescription.setSpacing(true);
    projDescription.addComponent(projectInformation);

    return projDescription;
}

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

License:Open Source License

/**
 * // w  ww.j  av  a  2s .c  om
 * @return
 * 
 */
VerticalLayout initStatistics() {
    VerticalLayout statistics = new VerticalLayout();
    statistics.setCaption("Status");

    statContent = new HorizontalLayout();
    statContent.addComponent(new Label(""));

    statContent.setMargin(new MarginInfo(true, false, false, true));
    statContent.setSpacing(true);

    statistics.addComponent(statContent);
    statistics.setMargin(new MarginInfo(true, false, false, true));
    statistics.setSpacing(true);

    status = new VerticalLayout();
    status.setSpacing(true);

    statistics.addComponent(status);
    return statistics;
}

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

License:Open Source License

VerticalLayout initTable() {
    this.table = this.buildFilterTable();
    this.tableClickChangeTreeView();
    VerticalLayout tableSection = new VerticalLayout();
    VerticalLayout tableSectionContent = new VerticalLayout();

    tableSection.setCaption("Exp. Steps");
    // tableSectionContent.setCaption("Registered Experiments");
    // tableSectionContent.setIcon(FontAwesome.FLASK);
    tableSectionContent.addComponent(this.table);

    tableSectionContent.setMargin(new MarginInfo(true, false, false, true));
    tableSection.setMargin(new MarginInfo(true, false, false, true));
    this.table.setWidth("100%");
    tableSection.setWidth(Page.getCurrent().getBrowserWindowWidth() * 0.8f, Unit.PIXELS);
    tableSectionContent.setWidth("100%");

    tableSection.addComponent(tableSectionContent);

    this.export = new Button("Export as TSV");
    buttonLayoutSection = new VerticalLayout();
    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setHeight(null);/*from ww  w  .  ja v a  2 s .c om*/
    buttonLayout.setWidth("100%");
    buttonLayout.addComponent(this.export);
    buttonLayout.setMargin(new MarginInfo(false, false, true, false));
    buttonLayoutSection.addComponent(buttonLayout);
    buttonLayoutSection.setSpacing(true);
    buttonLayoutSection.setMargin(new MarginInfo(false, false, true, true));

    tableSection.addComponent(buttonLayoutSection);

    return tableSection;
}

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

License:Open Source License

/**
 * /*w w  w . j  a v  a 2 s.com*/
 * @return
 */
VerticalLayout initGraph() {
    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(Page.getCurrent().getBrowserWindowWidth() * 0.8f, Unit.PIXELS);
    graphSectionContent.setWidth("100%");
    /*
     * final Button loadGraph = new Button("[+]"); loadGraph.setStyleName(ValoTheme.BUTTON_LINK);
     * loadGraph.addClickListener(new ClickListener() {
     * 
     * @Override public void buttonClick(ClickEvent event) { if
     * (graphSectionContent.getComponentCount() == 0 || !(graphSectionContent.getComponent(0)
     * instanceof Image)) { ProgressBar progress = new ProgressBar();
     * progress.setIndeterminate(true); Label info = new Label(
     * "Computing the project graph can take several seconds on big projects. Please be patient.");
     * info.setStyleName(ValoTheme.LABEL_SUCCESS); graphSectionContent.addComponent(info);
     * graphSectionContent.addComponent(progress); Worker worker = new Worker(getCurrent());
     * worker.start(); UI.getCurrent().setPollInterval(500); loadGraph.setEnabled(false); }
     * 
     * 
     * }
     * 
     * public void processed() { UI.getCurrent().setPollInterval(-1); loadGraph.setVisible(false); }
     * 
     * class Worker extends Thread { private ProjectView projectView;
     * 
     * public Worker(ProjectView current) { projectView = current; }
     * 
     * @Override public void run() { projectView.updateContentGraph(); synchronized
     * (UI.getCurrent()) { processed(); }
     * 
     * } } });
     */
    graphSection.addComponent(graphSectionContent);
    return graphSection;
}

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

License:Open Source License

/**
 * for both graphs/*from w  w w. ja v a  2s  .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;
}

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

License:Open Source License

/**
 * initializes the description layout//ww w. ja  va 2  s.  c  o  m
 * 
 * @return
 */
VerticalLayout initDescription() {
    VerticalLayout sampleDescription = new VerticalLayout();
    VerticalLayout sampleDescriptionContent = new VerticalLayout();

    // sampleDescriptionContent.setMargin(true);
    sampleDescription.setCaption("");

    // sampleDescriptionContent.setIcon(FontAwesome.FILE_TEXT_O);
    sampleTypeLabel = new Label("");
    sampleParentLabel = new Label("", ContentMode.HTML);

    parentButton = new Button("");
    parentButton.setStyleName(ValoTheme.BUTTON_LINK);
    parentButton.setIcon(FontAwesome.ARROW_CIRCLE_RIGHT);

    // Navigate to parent sample given by caption of button
    parentButton.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            State state = (State) UI.getCurrent().getSession().getAttribute("state");
            ArrayList<String> message = new ArrayList<String>();
            message.add("clicked");
            message.add(currentBean.getParents().get(0).getIdentifier());
            message.add("sample");
            state.notifyObservers(message);
        }
    });

    numberOfDatasetsLabel = new Label("");
    lastChangedDatasetLabel = new Label("");
    propertiesLabel = new Label("", ContentMode.HTML);
    propertiesLabel.setCaption("Properties");
    experimentalFactorLabel = new Label("", ContentMode.HTML);

    sampleDescriptionContent.addComponent(sampleTypeLabel);
    sampleDescriptionContent.addComponent(sampleParentLabel);
    sampleDescriptionContent.addComponent(parentButton);
    // sampleDescriptionContent.addComponent(numberOfDatasetsLabel);
    // sampleDescriptionContent.addComponent(lastChangedDatasetLabel);
    sampleDescriptionContent.addComponent(propertiesLabel);
    sampleDescriptionContent.addComponent(experimentalFactorLabel);
    sampleDescriptionContent.setSpacing(true);

    sampleDescriptionContent.setMargin(new MarginInfo(true, false, true, true));
    sampleDescription.addComponent(sampleDescriptionContent);
    sampleDescription.setMargin(new MarginInfo(true, false, true, true));
    return sampleDescription;
}

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

License:Open Source License

/**
 * //from  w ww .  j a v  a  2  s  . c  o m
 * @return
 * 
 */
VerticalLayout initStatistics() {

    // Statistics of sample
    VerticalLayout statistics = new VerticalLayout();
    HorizontalLayout statContent = new HorizontalLayout();
    statistics.setCaption("Statistics");
    // statContent.setIcon(FontAwesome.BAR_CHART_O);
    numberOfDatasetsLabel = new Label("");
    statContent.addComponent(numberOfDatasetsLabel);
    lastChangedDatasetLabel = new Label("");
    statContent.addComponent(lastChangedDatasetLabel);
    statContent.setMargin(new MarginInfo(true, false, false, true));
    statContent.setSpacing(true);
    // statContent.setMargin(true);
    // statContent.setSpacing(true);

    statistics.addComponent(statContent);
    // statistics.setMargin(true);

    // Properties of sample
    VerticalLayout properties = new VerticalLayout();
    VerticalLayout propertiesContent = new VerticalLayout();
    // propertiesContent.setCaption("Properties");
    // propertiesContent.setIcon(FontAwesome.LIST_UL);
    propertiesLabel = new Label("", ContentMode.HTML);

    propertiesContent.addComponent(propertiesLabel);
    propertiesContent.setMargin(new MarginInfo(true, false, false, true));

    properties.addComponent(propertiesContent);
    // properties.setMargin(true);
    statistics.addComponent(properties);

    // Experimental factors of sample
    VerticalLayout experimentalFactors = new VerticalLayout();
    VerticalLayout experimentalFactorsContent = new VerticalLayout();
    // experimentalFactorsContent.setCaption("Experimental Factors");
    // experimentalFactorsContent.setIcon(FontAwesome.TH);
    experimentalFactorLabel = new Label("", ContentMode.HTML);
    experimentalFactorsContent.addComponent(experimentalFactorLabel);
    experimentalFactorsContent.setMargin(new MarginInfo(true, false, true, true));

    experimentalFactors.addComponent(experimentalFactorsContent);
    statistics.addComponent(experimentalFactors);
    statistics.setSpacing(true);
    statistics.setMargin(new MarginInfo(true, false, true, true));

    return statistics;
}