Examples of ClassResource


Examples of com.vaadin.server.ClassResource

        Embedded player = new Embedded();
        player.setType(Embedded.TYPE_OBJECT);
        player.setMimeType("application/x-shockwave-flash");
        player.setWidth("400px");
        player.setHeight("300px");
        player.setSource(new ClassResource(
                com.vaadin.tests.components.flash.FlashIsVisible.class,
                "simple.swf"));
        addComponent(player);
    }
View Full Code Here

Examples of com.vaadin.server.ClassResource

    public void setup() {
        final Embedded player = new Embedded();
        player.setType(Embedded.TYPE_BROWSER);
        player.setWidth("400px");
        player.setHeight("300px");
        player.setSource(new ClassResource(getClass(), "test.pdf"));
        addComponent(player);

        addComponent(new Button("Remove pdf", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here

Examples of com.vaadin.server.ClassResource

        table.setSelectable(true);
        table.setVisibleColumns(new Object[] { "country" });
        layout.addComponent(table);

        Item item = table.addItem("FI");
        item.getItemProperty("icon").setValue(new ClassResource("fi.gif"));
        item.getItemProperty("country").setValue("Finland");
        item = table.addItem("SE");
        item.getItemProperty("icon").setValue(new FlagSeResource());
        item.getItemProperty("country").setValue("Sweden");
View Full Code Here

Examples of com.vaadin.server.ClassResource

        table.setSelectable(true);
        table.setVisibleColumns(new Object[] { "country" });
        window.addComponent(table);

        Item item = table.addItem("FI");
        item.getItemProperty("icon").setValue(new ClassResource("fi.gif"));
        item.getItemProperty("country").setValue("Finland");
        item = table.addItem("SE");
        item.getItemProperty("icon").setValue(new FlagSeResource());
        item.getItemProperty("country").setValue("Sweden");
View Full Code Here

Examples of com.vaadin.server.ClassResource

    @Override
    protected void setup() {
        Flash player = new Flash();
        player.setWidth("400px");
        player.setHeight("300px");
        player.setSource(new ClassResource("simple.swf"));
        addComponent(player);
    }
View Full Code Here

Examples of com.vaadin.server.ClassResource

            }

            Item item = cb.getItem(itemId);
            item.getItemProperty(PID).setValue(v);
            int flagIndex = i % 3;
            cb.setItemIcon(itemId, new ClassResource(
                    flagIndex == 0 ? "fi_small.png" : flagIndex == 1 ? "fi.gif"
                            : "se.gif"));
        }

        cb.select(selectId);
View Full Code Here

Examples of com.vaadin.server.ClassResource

        LinkedHashMap<String, Resource> options = new LinkedHashMap<String, Resource>();
        options.put("-", null);
        options.put("https://vaadin.com", new ExternalResource(
                "https://vaadin.com"));
        options.put("32x32 theme icon", ICON_32_ATTENTION_PNG_CACHEABLE);
        options.put("linktest-target.html", new ClassResource(
                "linktest-target.html"));

        createSelectAction("Link target", category, options,
                "https://vaadin.com", linkTargetCommand, null);
    }
View Full Code Here

Examples of com.vaadin.server.ClassResource

        table.setItemIconPropertyId("icon");
        table.setRowHeaderMode(Table.ROW_HEADER_MODE_ICON_ONLY);
        getLayout().addComponent(table);

        Item item = table.addItem("FI");
        item.getItemProperty("icon").setValue(new ClassResource("fi.gif"));
        item = table.addItem("SE");
        item.getItemProperty("icon").setValue(new ClassResource("se.gif"));

    }
View Full Code Here

Examples of com.vaadin.server.ClassResource

                                        + imgNum + ".jpg");
                        Thread.sleep(50);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    Resource resource = new ClassResource(
                            "/com/example/simpletable/img/px50-" + imgNum
                                    + ".jpg");
                    Embedded image = new Embedded("", resource);
                    image.setWidth("50px");
                    image.setHeight("50px");
View Full Code Here

Examples of com.vaadin.server.ClassResource

     * @return Component used to render this cell.
     */
    public Component generateCell(final Table source, final Object itemId, final Object columnId) {
        Property statusProperty = source.getItem(itemId).getItemProperty(columnId);

        noneIconResource = new ClassResource(QueryItemStatusColumnGenerator.class, "images/textfield.png");
        addedIconResource = new ClassResource(QueryItemStatusColumnGenerator.class, "images/textfield_add.png");
        modifiedIconResource = new ClassResource(QueryItemStatusColumnGenerator.class, "images/textfield_rename.png");
        removedIconResource = new ClassResource(QueryItemStatusColumnGenerator.class, "images/textfield_delete.png");

        statusIcon = new Image(null, noneIconResource);
        statusIcon.setHeight("16px");

        if (statusProperty instanceof ValueChangeNotifier) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.