Package com.vaadin.terminal

Examples of com.vaadin.terminal.ClassResource


      */
        StreamResource resource = new StreamResource(this, "/home/matrix/Desktop/pv.pdf", __app);
       
        // Set the right MIME type
        resource.setMIMEType(resource.getMIMEType());
        e.setSource(new ClassResource(resource.getFilename(), __app));
        window.addComponent(e);
        __app.getMainWindow().addWindow(window);
    }
View Full Code Here


         */
        StreamResource resource = new StreamResource(this, "/home/matrix/Desktop/pv.pdf", __app);
       
        // Set the right MIME type
        resource.setMIMEType(resource.getMIMEType());
        e.setSource(new ClassResource(resource.getFilename(), __app));
        __app.getMainWindow().addComponent(e);
    }
View Full Code Here

    return new FieldWithHelp(field, icon);
  }

  public Resource helpIcon(Integer i) {
    if(!helpIcons.containsKey(i)){
      helpIcons.put(i, new ClassResource(HelpUtility.class, "/img/help" + (i == null ? "" : i) + ".png", application));
    }
    return helpIcons.get(i);
  }
View Full Code Here

  @Override
  public Component render() {
    vl = new VerticalLayout();
        Button refreshDocumentList = new Button(getMessage("pt.ext.cmis.list.refresh"));
        refreshDocumentList.setIcon(new ClassResource(CmisDocumentListWidget.class, "/img/load-repository.png", getApplication()));
        refreshDocumentList.setImmediate(true);
        refreshDocumentList.setStyleName(BaseTheme.BUTTON_LINK);
        refreshDocumentList.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here

        }
        return b;
    }

    public static ClassResource imageResource(Application application, String fileName) {
        return new ClassResource(VaadinUtility.class, "/img/" + fileName, application);
    }
View Full Code Here

    public static ClassResource imageResource(Application application, String fileName) {
        return new ClassResource(VaadinUtility.class, "/img/" + fileName, application);
    }

    public static Embedded embedded(Application application, String fileName) {
        return new Embedded(null, new ClassResource(VaadinUtility.class, fileName, application));
    }
View Full Code Here

    return resourceCache.get(path);
  }

  public Resource getImage(String path) {
    if (!resourceCache.containsKey(path)) {
      resourceCache.put(path, new ClassResource(getClass(), path, application));
    }
    return resourceCache.get(path);
  }
View Full Code Here

TOP

Related Classes of com.vaadin.terminal.ClassResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.