List of usage examples for com.vaadin.server ExternalResource ExternalResource
public ExternalResource(String sourceURL)
From source file:probe.com.view.body.quantdatasetsoverview.quantproteinstabsheet.studies.ProteinStudyComparisonScatterPlotLayout.java
/** * * @param heighlight/* ww w . j a va 2 s .com*/ * @param clicked */ public void highlight(boolean heighlight, boolean clicked) { if (heighlight) { // styles.add("." + teststyle + " { background-image: url(" + heighlightedScatterPlottImgUrl + " );background-position:center; background-repeat: no-repeat; }"); defaultChartImage.setSource(new ExternalResource(heighlightedScatterPlottImgUrl)); } else if (!heighlight) { // if (!isclicked) { // styles.add("." + teststyle + " { background-image: url(" + defaultScatterPlottImgUrl + " );background-position:center; background-repeat: no-repeat; }"); defaultChartImage.setSource(new ExternalResource(defaultScatterPlottImgUrl)); // } else { // isclicked = false; // } } if (clicked) { isclicked = true; if (this.getParent().isVisible()) { this.getUI().scrollIntoView(this.ProteinScatterPlotContainer); } } }
From source file:probe.com.view.body.quantdatasetsoverview.quantproteinstabsheet.studies.ProteinStudyComparisonScatterPlotLayout.java
/** * *///w ww . j ava 2s . c om public void redrawChart() { if (defaultScatterPlottImgUrl == null) { this.generateScatterplotchart(comparisonProtein, imgWidth, 150); studyPopupLayoutManager = new PeptidesStackedBarChartsControler(width, patientGroupsNumToDsIdMap, comparisonProtein.getProteinAccssionNumber(), comparisonProtein.getProtName(), comparisonProtein.getUrl(), comparisonProtein.getComparison().getComparisonFullName(), comparisonProtein.getDsQuantProteinsMap(), dsKeyDatasetMap, Quant_Central_Manager.getDiseaseHashedColorMap()); } // styles.add("." + teststyle + " { background-image: url(" + defaultScatterPlottImgUrl + " );background-position:center; background-repeat: no-repeat; }"); defaultChartImage.setSource(new ExternalResource(defaultScatterPlottImgUrl)); }
From source file:probe.com.view.core.chart4j.VennDiagramContainer.java
public VennDiagramContainer() { ArrayList<String> grI = new ArrayList<String>(); grI.add("A"); grI.add("B"); grI.add("C"); grI.add("D"); ArrayList<String> grII = new ArrayList<String>(); grII.add("E"); grII.add("F"); grII.add("G"); grII.add("A"); grII.add("B"); ArrayList<String> grIII = new ArrayList<String>(); grI.add("I"); grI.add("H"); grI.add("C"); grI.add("D"); ArrayList<String> grIIII = new ArrayList<String>(); grII.add("J"); grII.add("K"); grII.add("L"); grII.add("A"); grII.add("B"); VennCode vennDiagramPanel = new VennCode(); VennDiagramPanel vdp = new VennDiagramPanel(grI, grII, grIII, grIIII, "A", "B", "C", "D", Color.yellow, Color.yellow, Color.yellow, Color.yellow); JPanel xyPlotPanel = new JPanel(); xyPlotPanel.add(vennDiagramPanel);/*from w w w . j a v a2 s. c o m*/ xyPlotPanel.setSize(500, 500); vennDiagramPanel.setSize(500, 500); Image img = new Image("", new ExternalResource(chartImgGenerator.generateHeatMap(vennDiagramPanel))); this.addComponent(img); MainApp main = new MainApp(7, DESIGN_ATTR_PLAIN_TEXT, DESIGN_ATTR_PLAIN_TEXT); main.createDiagrams(1, 0); }
From source file:songstock.web.extensions.download.DownloadsView.java
License:Open Source License
/** * Loads and displays the download links. * @param links to display//from w w w. j av a 2 s. c o m */ public void loadLinks(HashMap<Object[], String> links) { tableDownloadLinks.removeAllItems(); for (Map.Entry<Object[], String> entry : links.entrySet()) { Link link = new Link("Download", new ExternalResource(entry.getValue())); int length = 35; //BASE_PATH length String songName = entry.getValue().substring(length + 1).split("[/.]")[2]; tableDownloadLinks.addItem(new Object[] { songName, ((IItem) entry.getKey()[0]).getArtist(), link }, entry.getKey()); } }
From source file:ubu.digit.ui.components.Footer.java
License:Creative Commons License
/** * Aade la informacin del proyecto.//from w w w . jav a2 s .c o m */ private void addInformation() { VerticalLayout information = new VerticalLayout(); information.setMargin(false); information.setSpacing(true); Label subtitle = new Label(INFORMACION); subtitle.setStyleName(SUBTITLE_STYLE); Label version2 = new Label("Versin 2.0 creada por Javier de la Fuente Barrios"); Link link2 = new Link("jfb0019@alu.ubu.es", new ExternalResource("mailto:jfb0019@alu.ubu.es")); link2.setIcon(FontAwesome.ENVELOPE); Label version1 = new Label("Versin 1.0 creada por Beatriz Zurera Martnez-Acitores"); Link link1 = new Link("bzm0001@alu.ubu.es", new ExternalResource("mailto:bzm0001@alu.ubu.es")); link1.setIcon(FontAwesome.ENVELOPE); Label tutor = new Label("Tutorizado por Carlos Lpez Nozal"); Link linkT = new Link("clopezno@ubu.es", new ExternalResource("mailto:clopezno@alu.ubu.es")); linkT.setIcon(FontAwesome.ENVELOPE); Label copyright = new Label("Copyright @ LSI"); information.addComponents(subtitle, version2, link2, version1, link1, tutor, linkT, copyright); content.addComponent(information); }
From source file:ubu.digit.ui.components.Footer.java
License:Creative Commons License
/** * Aade la informacin de la licencia del proyecto. *//* w w w.ja va 2s .co m*/ private void addLicense() { VerticalLayout license = new VerticalLayout(); license.setMargin(false); license.setSpacing(true); Link ccImage = new Link(null, new ExternalResource("https://creativecommons.org/licenses/by/4.0/")); ccImage.setIcon(new ThemeResource("img/cc.png")); Label licenseText = new Label("This work is licensed under a: "); Link ccLink = new Link("Creative Commons Attribution 4.0 International License.", new ExternalResource("https://creativecommons.org/licenses/by/4.0/")); license.addComponents(ccImage, licenseText, ccLink); if (fileName != null) { String lastModified = getLastModified(fileName); license.addComponent(new Label("Ultima actualizacin: " + lastModified)); } Button login = new Button("Actualizar"); login.addClickListener(new LoginClickListener()); license.addComponent(login); content.addComponent(license); }