Package com.vaadin.server

Examples of com.vaadin.server.ThemeResource


        MenuBar settings = new MenuBar();
        settings.addStyleName("user-menu");
        StringGenerator sg = new StringGenerator();
        MenuItem settingsItem = settings.addItem(
                sg.nextString(true) + " " + sg.nextString(true)
                        + sg.nextString(false), new ThemeResource(
                        "../tests-valo/img/profile-pic-300px.jpg"), null);
        settingsItem.addItem("Edit Profile", null);
        settingsItem.addItem("Preferences", null);
        settingsItem.addSeparator();
        settingsItem.addItem("Sign Out", null);
View Full Code Here


        final Label label = new Label(
                "This is a long text block that will wrap.");
        label.setWidth("120px");
        components.add(label);

        final Embedded image = new Embedded("", new ThemeResource(
                "../runo/icons/64/document.png"));
        components.add(image);

        final CssLayout documentLayout = new CssLayout();
        documentLayout.setWidth("19px");
        for (int i = 0; i < 5; ++i) {
            final Embedded e = new Embedded(null, new ThemeResource(
                    "../runo/icons/16/document.png"));
            e.setHeight("16px");
            e.setWidth("16px");
            documentLayout.addComponent(e);
        }
View Full Code Here

        layout.addComponent(new Button("Switch icon type",
                new Button.ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        buildUI(icon instanceof FontIcon ? new ThemeResource(
                                "../runo/icons/16/user.png")
                                : FontAwesome.ANDROID);
                    }
                }));
View Full Code Here

            Object property = i.next();
            Field<?> f = form.getField(property);

            f.setRequired(r.nextBoolean());
            if (r.nextBoolean()) {
                f.setIcon(new ThemeResource("icons/16/document-add.png"));
            }
            if (r.nextBoolean()) {
                f.setCaption(null);
            }
View Full Code Here

        newLayout.setSizeFull();

        String captions[] = new String[] { "TextField with caption", null };
        Resource icons[] = new Resource[] {
                new ThemeResource("icons/16/document-delete.png"), null };
        boolean required[] = new boolean[] { true, false };
        TextField fields[][] = new TextField[captions.length][icons.length];
        for (int caption = 0; caption < captions.length; caption++) {
            for (int icon = 0; icon < icons.length; icon++) {
                for (int req = 0; req < required.length; req++) {
View Full Code Here

                                        w.close();
                                    }
                                });
                        layout.addComponent(close);
                        Button iconButton = new Button("A button with icon");
                        iconButton.setIcon(new ThemeResource(
                                "../runo/icons/16/ok.png"));
                        layout.addComponent(iconButton);

                        event.getButton().getUI().addWindow(w);
                        iconButton.focus();
View Full Code Here

    @Override
    protected void init(final VaadinRequest request) {
        final VerticalLayout layout = new VerticalLayout();
        setContent(layout);

        final ThemeResource iconResource = new ThemeResource(
                "../runo/icons/16/arrow-left.png");

        final ClickListener iconToggleListener = new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
View Full Code Here

                                w.close();
                            }
                        }));
                Button iconButton = new Button("A button with icon");
                iconButton
                        .setIcon(new ThemeResource("../runo/icons/16/ok.png"));
                layout.addComponent(iconButton);
                event.getButton().getUI().addWindow(w);
            }

        });
View Full Code Here

    }

    @Override
    protected void setup() {
        Button b = new Button("Text and icon");
        b.setIcon(new ThemeResource("../runo/icons/16/ok.png"));

        addComponent(b);

        b = new Button("Only text");

        addComponent(b);
        b = new Button((String) null);
        b.setIcon(new ThemeResource("../runo/icons/16/ok.png"));

        addComponent(b);

        b = new NativeButton("Text and icon");
        b.setIcon(new ThemeResource("../runo/icons/16/ok.png"));

        addComponent(b);

        b = new NativeButton("Only text");

        addComponent(b);
        b = new NativeButton(null);
        b.setIcon(new ThemeResource("../runo/icons/16/ok.png"));

        addComponent(b);
    }
View Full Code Here

        return 2853;
    }

    @Override
    protected void setup() {
        final Embedded e = new Embedded("Caption", new ThemeResource(
                "../runo/icons/64/ok.png"));
        e.setAlternateText("Alt text of the image");
        addComponent(e);
        final Embedded player = new Embedded();
        player.setAlternateText("Alt text of the object");
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.