List of usage examples for com.vaadin.ui Embedded Embedded
public Embedded(String caption, Resource source)
From source file:org.hip.vif.web.util.RatingValue.java
License:Open Source License
/** @return {@link Component} the rating value as embedded gif. */ public Component render() { final Embedded out = new Embedded(null, new ThemeResource(String.format(TMPL_IMG, img))); out.setStyleName("vif-rating-value"); //$NON-NLS-1$ out.setDescription(messages.getMessage(msgKey)); return out;/*from www.ja v a 2 s .co m*/ }
From source file:org.icrisat.gdms.ui.GDMSMain.java
VerticalLayout buildWelcomeScreen() { VerticalLayout layoutForWelcomeTab = new VerticalLayout(); layoutForWelcomeTab.setMargin(true); layoutForWelcomeTab.setSpacing(true); layoutForWelcomeTab.setCaption("Welcome"); layoutForWelcomeTab.setStyleName(Reindeer.LAYOUT_WHITE); CssLayout cssLayout = new CssLayout(); cssLayout.setMargin(true);/*from ww w. j a v a 2 s.c o m*/ cssLayout.setWidth("100%"); layoutForWelcomeTab.addComponent(cssLayout); HeadingOne title = new HeadingOne("Welcome to Genotyping Data Management"); cssLayout.addComponent(title); HorizontalLayout horizLayoutForIntroPara = new HorizontalLayout(); horizLayoutForIntroPara.setSpacing(true); horizLayoutForIntroPara.setWidth("100%"); horizLayoutForIntroPara.setMargin(true, false, true, false); cssLayout.addComponent(horizLayoutForIntroPara); String strIntroPara1 = "<p>The Genotyping Data Management System aims to provide a comprehensive public repository " + "for genotype, linkage map and QTL data from crop species relevant in the semi-arid tropics.</p>"; String strIntroPara2 = "<p>This system is developed in Java and the database is MySQL. The initial release record " + "details of current genotype datasets generated for GCP mandate crops along with details of " + "molecular markers and related metadata. The Retrieve tab is a good starting point to browse " + "or query the database contents. The datasets available for each crop species can be queried. " + "Access to data sets requires a login.</p>"; String strIntroPara3 = "<p>Data may be currently exported to the following formats: 2x2 matrix and flapjack software formats. " + "Data submission is through templates; upload templates are available for genotype, QTL and " + "map data(type of markers - SSR, SNP and DArt). The templates are in the form of excel sheets with built-in " + "validation functions.</p>"; Label lblPara = new Label(strIntroPara1 + strIntroPara2 + strIntroPara3, Label.CONTENT_XHTML); horizLayoutForIntroPara.addComponent(lblPara); horizLayoutForIntroPara.setExpandRatio(lblPara, 1); //Spacer lblPara = new Label(""); lblPara.setWidth("20px"); horizLayoutForIntroPara.addComponent(lblPara); ThemeResource themeResource = new ThemeResource("images/FlowChart.jpg"); Embedded headerImage = new Embedded("", themeResource); headerImage.setWidth("500px"); headerImage.setHeight("400px"); horizLayoutForIntroPara.addComponent(headerImage); return layoutForWelcomeTab; }
From source file:org.icrisat.gdms.ui.GDMSMain.java
CssLayout getHeader() { CssLayout cssLayoutForHeaderImage = new CssLayout(); cssLayoutForHeaderImage.setWidth("100%"); ThemeResource themeResource = new ThemeResource("images/GDMS.gif"); //ThemeResource themeResource = new ThemeResource("images/Banner3.jpg"); Embedded headerImage = new Embedded("", themeResource); headerImage.setSizeFull();//from ww w . j av a2 s . co m cssLayoutForHeaderImage.setSizeFull(); cssLayoutForHeaderImage.addComponent(headerImage); cssLayoutForHeaderImage.setMargin(false, false, false, false); return cssLayoutForHeaderImage; }
From source file:org.icrisat.gdms.ui.GDMSMain.java
CssLayout getBottomPanelLayout() { CssLayout cssLayoutForContactImage = new CssLayout(); cssLayoutForContactImage.setWidth("100%"); ThemeResource themeResource = new ThemeResource("images/GDMS_Footer.gif"); Embedded contactImage = new Embedded("", themeResource); contactImage.setWidth("1000px"); contactImage.setHeight("20px"); cssLayoutForContactImage.addComponent(contactImage); return cssLayoutForContactImage; }
From source file:org.iespuigcastellar.attendancemanager.screenlayouts.logininfo.BlackHawkLoginInfoLayout.java
License:Open Source License
public void attach() { HorizontalLayout hlayout = new HorizontalLayout(); hlayout.setSpacing(true);/*from w w w. j a va 2 s.com*/ Embedded item = new Embedded("", new ClassResource("screenlayouts/logininfo/black_hawk.jpg", getApplication())); hlayout.addComponent(item); hlayout.setComponentAlignment(item, Alignment.MIDDLE_CENTER); Label haikuText = new Label( "<p>\"Lnea de gansos en vuelo;<br> al pie de la colina,<br> la luna puesta por sello\"</p>" + "<p>\"Iba yo a los cerezos en flor<br> Dorma bajo ellos<br> As era mi pasatiempo\"</p>" + "<p>\"La lluvia en invierno<br> Muestra lo que los ojos ven<br> Como si fuera cosa antigua\"</p>" + "<p>Yosa Buson</p>"); haikuText.setContentMode(Label.CONTENT_XHTML); hlayout.addComponent(haikuText); addComponent(hlayout); }
From source file:org.iespuigcastellar.attendancemanager.screenlayouts.logininfo.CuckooLoginInfoLayout.java
License:Open Source License
public void attach() { Embedded item = new Embedded("", new ClassResource("screenlayouts/logininfo/flea.png", getApplication())); addComponent(item);/*from w w w.jav a2 s . co m*/ setComponentAlignment(item, Alignment.MIDDLE_CENTER); }
From source file:org.iespuigcastellar.attendancemanager.screenlayouts.logininfo.FleaLoginInfoLayout.java
License:Open Source License
public void attach() { Embedded item = new Embedded("", new ClassResource("screenlayouts/logininfo/cuckoo.jpg", getApplication())); addComponent(item);/* w w w. j a v a 2 s. c o m*/ setComponentAlignment(item, Alignment.MIDDLE_CENTER); }
From source file:org.iespuigcastellar.attendancemanager.screenlayouts.logininfo.HarunobuLoginInfoLayout.java
License:Open Source License
public void attach() { Embedded item = new Embedded("", new ClassResource("screenlayouts/logininfo/harunobu.jpg", getApplication())); addComponent(item);// w w w.j a v a2 s . c om setComponentAlignment(item, Alignment.MIDDLE_CENTER); }
From source file:org.iespuigcastellar.attendancemanager.screenlayouts.logininfo.LogosLoginInfoLayout.java
License:Open Source License
public void attach() { Embedded item = new Embedded("", new ClassResource("screenlayouts/logininfo/logos.png", getApplication())); addComponent(item);//from www . j ava 2 s . c om setComponentAlignment(item, Alignment.MIDDLE_CENTER); }
From source file:org.iespuigcastellar.attendancemanager.screenlayouts.logininfo.MicroscopeLoginInfoLayout.java
License:Open Source License
public void attach() { Embedded item = new Embedded("", new ClassResource("screenlayouts/logininfo/Hooke-microscope.png", getApplication())); addComponent(item);/*w ww . ja va2 s.c om*/ setComponentAlignment(item, Alignment.MIDDLE_CENTER); }