Package com.vaadin.server

Examples of com.vaadin.server.ThemeResource


    abstract protected Class<T> getTestClass();

    protected static ThemeResource uncacheableThemeResource(
            String resourceLocation) {
        return new ThemeResource(resourceLocation + "?" + new Date().getTime());
    }
View Full Code Here


        return new ThemeResource(resourceLocation + "?" + new Date().getTime());
    }

    protected static ThemeResource cacheableThemeResource(
            String resourceLocation) {
        return new ThemeResource(resourceLocation);
    }
View Full Code Here

            // if component is a tab sheet add two tabs for it
            if (comp instanceof TabSheet) {
                comp.setSizeUndefined();
                TabSheet tab = (TabSheet) comp;
                tab.addTab(new UndefWideLabel("TAB1"), "TAB1",
                        new ThemeResource(GLOBE_16_PNG));
                tab.addTab(new UndefWideLabel("TAB2"), "TAB2", null);
            }
            curLayout.addComponent(comp);
            mainLayout.addComponent(curLayout);
        }
View Full Code Here

    protected void setIcon(boolean value) {
        for (AbstractField<?> c : components) {
            if (!value) {
                c.setIcon(null);
            } else {
                c.setIcon(new ThemeResource("../runo/icons/16/ok.png"));
            }
        }

    }
View Full Code Here

        Label content2 = new Label("Second Component");
        ts.addTab(content2, "Second");
        ts.getTab(content2).setClosable(true);

        Label content3 = new Label("Third Component");
        ts.addTab(content3, "Third", new ThemeResource(parent.ICON_URL));
        ts.getTab(content3).setEnabled(false);

        if (styleName != null) {
            ts.addStyleName(styleName);
        }
View Full Code Here

                "document-edit", "document-image", "document-pdf",
                "document-ppt", "document-txt", "document-web", "document" };
        for (String icon : icons) {
            Item item = cb.addItem(icon);
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../runo/icons/32/" + icon + ".png?"
                            + new Date().getTime()));
        }

    }
View Full Code Here

        setTheme("runo");
        Tree tree = new Tree();
        tree.setWidth("100px");

        tree.addItem("1");
        tree.setItemIcon("1", new ThemeResource("../runo/icons/16/ok.png"));

        String mainItem = "A very long item that should not wrap";
        String subItem = "Subitem - also long";

        tree.addItem(mainItem);
        tree.setItemIcon(mainItem, new ThemeResource(
                "../runo/icons/16/error.png"));

        tree.addItem(subItem);
        tree.setParent(subItem, mainItem);
View Full Code Here

    @Override
    protected void setup() {
        Link l = new Link("www.google.com", new ExternalResource(
                "http://www.vaadin.com/"));
        l.setIcon(new ThemeResource("../runo/icons/32/calendar.png"));

        addComponent(l);
    }
View Full Code Here

public class TreeWithIcons extends TestBase {

    @Override
    protected void setup() {
        ThemeResource notCachedFolderIconHuge = new ThemeResource(
                "../runo/icons/64/folder.png?" + new Date().getTime());
        ThemeResource notCachedFolderIconLarge = new ThemeResource(
                "../runo/icons/32/folder.png?" + new Date().getTime());
        ThemeResource notCachedFolderIconLargeOther = new ThemeResource(
                "../runo/icons/32/ok.png?" + new Date().getTime());
        Tree t = new Tree();
        t.setImmediate(true);

        t.addItem("Root 1");
View Full Code Here

        for (String size : sizes) {
            Label title = new Label("<h3>" + size + "x" + size + "</h3>",
                    ContentMode.HTML);
            container.addComponent(title);
            for (String icon : icons) {
                ThemeResource res = new ThemeResource("../runo/icons/" + size
                        + "/" + icon);
                if (TYPE_CAPTION.equals(iconType)) {
                    Label name = new Label();
                    name.setCaption(icon);
                    name.setIcon(res);
View Full Code Here

TOP

Related Classes of com.vaadin.server.ThemeResource

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.