List of usage examples for com.vaadin.server FileResource getFilename
@Override
public String getFilename()
From source file:net.sourceforge.javydreamercsw.validation.manager.web.file.ImageDisplay.java
License:Apache License
@Override public Window getViewer(File f) { w = new VMWindow(f.getName()); boolean found = false; for (FileResource fr : images) { if (fr.getFilename().equals(f.getName())) { found = true;/* w ww . j a v a 2 s.c o m*/ break; } } if (!found) { images.add(new FileResource(f)); } imageViewer.setImages(images); w.setContent(imageViewer); w.setHeight(80, Sizeable.Unit.PERCENTAGE); w.setWidth(80, Sizeable.Unit.PERCENTAGE); imageViewer.setCenterImageIndex(0); imageViewer.focus(); return w; }