List of usage examples for com.vaadin.ui Embedded Embedded
public Embedded()
From source file:org.vaadin.alump.fancylayouts.demo.PanelDemo.java
License:Apache License
/** * Sample content with more stuff//w w w. j a v a 2 s .c o m * * @return */ private ComponentContainer createPanelContentB() { VerticalLayout layout = new VerticalLayout(); layout.setWidth("100%"); layout.setMargin(true); layout.setSpacing(true); Label label = new Label(BECON_STR); layout.addComponent(label); Embedded image = new Embedded(); image.setSource(new ExternalResource("http://misc.siika.fi/kaljanhimo.jpg")); image.setWidth("300px"); image.setHeight("187px"); layout.addComponent(image); layout.setComponentAlignment(image, Alignment.MIDDLE_CENTER); Label label2 = new Label(BECON_STR); layout.addComponent(label2); return layout; }
From source file:songstock.web.extensions.browsing.AlbumDetailsView.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);/*from w w w . j a v a2s . co m*/ mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // labelAlbumName labelAlbumName = new Label(); labelAlbumName.setImmediate(false); labelAlbumName.setWidth("-1px"); labelAlbumName.setHeight("-1px"); labelAlbumName.setValue("<b>Album Name</b>"); labelAlbumName.setContentMode(com.vaadin.shared.ui.label.ContentMode.HTML); mainLayout.addComponent(labelAlbumName, "top:20.0px;left:20.0px;"); // labelAlbumArtist labelAlbumArtist = new Label(); labelAlbumArtist.setImmediate(false); labelAlbumArtist.setWidth("-1px"); labelAlbumArtist.setHeight("-1px"); labelAlbumArtist.setValue("Album Artist"); mainLayout.addComponent(labelAlbumArtist, "top:40.0px;left:20.0px;"); // labelAlbumReleaseYear labelAlbumReleaseYear = new Label(); labelAlbumReleaseYear.setImmediate(false); labelAlbumReleaseYear.setWidth("-1px"); labelAlbumReleaseYear.setHeight("-1px"); labelAlbumReleaseYear.setValue("<i>Album Release Year</i>"); labelAlbumReleaseYear.setContentMode(com.vaadin.shared.ui.label.ContentMode.HTML); mainLayout.addComponent(labelAlbumReleaseYear, "top:60.0px;left:20.0px;"); // embeddedAlbumArtwork embeddedAlbumArtwork = new Embedded(); embeddedAlbumArtwork.setImmediate(false); embeddedAlbumArtwork.setWidth("90px"); embeddedAlbumArtwork.setHeight("-1px"); embeddedAlbumArtwork.setSource(new ThemeResource("img/component/embedded_icon.png")); embeddedAlbumArtwork.setType(1); embeddedAlbumArtwork.setMimeType("image/png"); mainLayout.addComponent(embeddedAlbumArtwork, "top:20.0px;right:20.0px;"); // tableAlbumSongs tableAlbumSongs = new Table(); tableAlbumSongs.setImmediate(false); tableAlbumSongs.setWidth("100.0%"); tableAlbumSongs.setHeight("100.0%"); mainLayout.addComponent(tableAlbumSongs, "top:100.0px;right:20.0px;bottom:20.0px;left:20.0px;"); return mainLayout; }