List of usage examples for com.vaadin.ui Embedded setCaption
@Override public void setCaption(String caption)
From source file:com.foc.vaadin.gui.FVIconFactory.java
License:Apache License
public Embedded getFVIcon(String iconName, boolean dispLayCaption) { Resource iconResourse = new ThemeResource("../" + THEME_DIR + "/icons/" + iconName); Embedded embedded = new Embedded(null, iconResourse); if (!iconName.equals(ICON_TRASH_SMALL)) { embedded.setWidth("32px"); embedded.setHeight("32px"); }//from w w w. j a va 2 s .co m if (dispLayCaption) { embedded.setCaption(iconName); } return embedded; }
From source file:com.tapas.evidence.fe.components.EvidenceUpload.java
License:Apache License
public void showImage(String path) { final Resource imageResource = new ExternalResource(path); Embedded image = new Embedded("", imageResource); image.setCaption(null); image.setWidth("200px"); imagePanel.setHeight(null);/*from w w w .j a va 2 s. c o m*/ imagePanel.removeAllComponents(); imagePanel.addComponent(image); status.setValue(null); }
From source file:com.tapas.evidence.fe.components.EvidenceUpload.java
License:Apache License
public void showImage(final byte[] byteArray) { final StreamResource imageResource = new StreamResource(new ImageSource(byteArray), "photo.jpg", getApplication());/*w w w . ja va 2s. c om*/ imageResource.setCacheTime(0); // disable cache Embedded image = new Embedded("", imageResource); image.setCaption(null); image.setWidth("200px"); imagePanel.setHeight(null); imagePanel.addComponent(image); status.setValue(null); }