List of usage examples for com.vaadin.ui VerticalLayout setMargin
@Override public void setMargin(boolean enabled)
From source file:de.uni_tuebingen.qbic.qbicmainportlet.PatientView.java
License:Open Source License
/** * initializes the hla type layout/*from w w w . j av a2 s . c om*/ * * @return */ VerticalLayout initHLALayout() { VerticalLayout hlaTyping = new VerticalLayout(); VerticalLayout hlaTypingContent = new VerticalLayout(); hlaTyping.setCaption("HLA Typing"); // String desc = currentBean.getDescription(); // if (!desc.isEmpty()) { // descContent.setValue(desc); // } hlaTypeLabel = new Label("Not available.", ContentMode.HTML); hlaTypeLabel.setStyleName("patientview"); hlaTypingContent.setMargin(new MarginInfo(true, false, true, true)); hlaTypingContent.setSpacing(true); // hlaTypingContent.setCaption("HLA Typing"); // hlaTypingContent.setIcon(FontAwesome.BARCODE); hlaTypingContent.addComponent(hlaTypeLabel); hlaTyping.addComponent(hlaTypingContent); hlaTyping.setMargin(new MarginInfo(true, false, true, true)); hlaTyping.setSpacing(true); hlaTyping.setWidth("100%"); return hlaTyping; }
From source file:de.uni_tuebingen.qbic.qbicmainportlet.PatientView.java
License:Open Source License
VerticalLayout initTable() { registeredExperiments = 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(registeredExperiments); tableSectionContent.setMargin(new MarginInfo(true, false, false, true)); tableSection.setMargin(new MarginInfo(true, false, false, true)); registeredExperiments.setWidth("100%"); tableSection.setWidth("100%"); 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 . j a va 2s . 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.PatientView.java
License:Open Source License
/** * /* w w w . j a v a2 s . c o m*/ * @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 w w w . j av 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 ww w . ja va 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.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 www .j a v 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
/** * //from w ww. j a v a2s.c o m * @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);/* w w w . j a va 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
/** * //from ww w . ja v a2 s. co 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(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/*ww w . j a v a 2s. 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; }