Package com.vaadin.server

Examples of com.vaadin.server.ThemeResource


    addComponent(getTxtBusqueda());
    setExpandRatio(getTxtBusqueda(), 2f);

    setBtnSearch(new Button());
    getBtnSearch().setIcon(
        new ThemeResource("../factelect/icons/refresh.png"));
    getBtnSearch().setDescription(
        GstFormat.description("Buscar",
            "Inicia la busqueda de contenidos"));
    getBtnSearch().setWidth("-1px");
    getBtnSearch().setHeight("-1px");
View Full Code Here


      if (isViewcap())
        lsButCom[i].setCaption(lsCapt[i].toUpperCase());
      else
        lsButCom[i].setCaption("");

      lsButCom[i].setIcon(new ThemeResource("../factelect/icons/"
          + caption + lsIcons[i]));
      lsButCom[i].setDescription(GstFormat.description(lsCapt[i],
          lsDescr[i]));
      if (!getStyleBtn().isEmpty())
        lsButCom[i].setStyleName(getStyleBtn());
View Full Code Here

                .addValueChangeListener(new Property.ValueChangeListener() {

                    @Override
                    public void valueChange(ValueChangeEvent event) {
                        if ((Boolean) event.getProperty().getValue()) {
                            notifications.setDefaultIcon(new ThemeResource(
                                    "images/vaadin.png"));
                        } else {
                            notifications.setDefaultIcon(null);
                        }
                    }
                });

        positionCB = new ComboBox("Position");
        positionCB.setImmediate(true);
        for (Position position : Position.values()) {
            positionCB.addItem(position);
        }
        positionCB.addValueChangeListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                notifications.setPosition((Position) event.getProperty()
                        .getValue());
            }

        });
        optionLayout.addComponent(positionCB);

        HorizontalLayout buttonLayout = new HorizontalLayout();
        buttonLayout.setCaption("Add notifications");
        buttonLayout.setSpacing(true);
        addComponent(buttonLayout);

        final Button hello = new Button("Single line");
        hello.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                notifications.showNotification(hello, "Hello World!");
            }
        });
        buttonLayout.addComponent(hello);

        final Button lorem = new Button("Two lines");
        lorem.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                notifications.showNotification(lorem, "Lorem ipsum",
                        "foo bar lorem ipsum bar foo");
            }
        });
        buttonLayout.addComponent(lorem);

        final Button vaadin = new Button("Icon");
        vaadin.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                notifications.showNotification(vaadin, "Vaadin",
                        "http://www.vaadin.com", new ThemeResource(
                                "images/reindeer.png"));
            }
        });
        buttonLayout.addComponent(vaadin);

        final Button styled = new Button("Styled");
        styled.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                notifications.showNotification(styled, "I'm special!",
                        "...I have fancy colors and fonts!", null,
                        "demo-special-notification");
            }
        });
        buttonLayout.addComponent(styled);

        final Button longText = new Button("Long text");
        longText.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                notifications
                        .showNotification(
                                longText,
                                "Very long title is very long. If it were any longer it would not be a title anymore.",
                                "Also description is really long, nobody knows why, but it's still long! You see? Well, trust me. This is long!");
            }
        });
        buttonLayout.addComponent(longText);

        final Button messageExample = new Button("Msg example");
        messageExample.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                notifications.showNotification(messageExample, "Sami Viitanen",
                        "Thanks for using FancyLayouts! Hopefully you will "
                                + "find this add on useful.",
                        new ThemeResource("images/avatar.png"));
            }
        });
        buttonLayout.addComponent(messageExample);

        final Button htmlExample = new Button("HTML example");
View Full Code Here

        layout.addStyleName("demo-panel-d");
        layout.setWidth("100%");
        layout.setHeight("100%");

        Image image = new Image();
        image.setSource(new ThemeResource("images/meme.jpg"));
        image.addStyleName("demo-meme");
        layout.addComponent(image);

        return layout;
    }
View Full Code Here

        drafts.setSpacing(true);
        titleAndDrafts.addComponent(drafts);

        CssLayout draftThumb = new CssLayout();
        draftThumb.addStyleName("draft-thumb");
        Image draft = new Image(null, new ThemeResource(
                "img/draft-report-thumb.png"));
        draftThumb.addComponent(draft);
        Label draftTitle = new Label(
                "Monthly revenue<br><span>Last modified 1 day ago</span>",
                ContentMode.HTML);
View Full Code Here

        Label help = new Label("Drag items to the canvas");
        help.addStyleName("help");
        paletteLayout.addComponent(help);

        CssLayout wrap = new CssLayout();
        Image l = new Image(null, new ThemeResource("img/palette-text.png"));
        wrap.addComponent(l);
        Label caption = new Label("Text Block");
        caption.setSizeUndefined();
        wrap.addComponent(caption);
        DragAndDropWrapper rte = new DragAndDropWrapper(wrap);
        rte.setSizeUndefined();
        rte.setCaption("text");
        paletteLayout.addComponent(rte);
        rte.setDragStartMode(DragStartMode.WRAPPER);

        wrap = new CssLayout();
        l = new Image(null, new ThemeResource("img/palette-grid.png"));
        wrap.addComponent(l);
        caption = new Label("Top 10 Movies");
        caption.setSizeUndefined();
        wrap.addComponent(caption);
        DragAndDropWrapper grid = new DragAndDropWrapper(wrap);
        grid.setCaption("grid");
        grid.setSizeUndefined();
        paletteLayout.addComponent(grid);
        grid.setDragStartMode(DragStartMode.WRAPPER);

        wrap = new CssLayout();
        l = new Image(null, new ThemeResource("img/palette-chart.png"));
        wrap.addComponent(l);
        caption = new Label("Top 4 Revenue");
        caption.setSizeUndefined();
        wrap.addComponent(caption);
        DragAndDropWrapper chart = new DragAndDropWrapper(wrap);
View Full Code Here

                            {
                                setSizeUndefined();
                                addStyleName("user");
                                Image profilePic = new Image(
                                        null,
                                        new ThemeResource("img/profile-pic.png"));
                                profilePic.setWidth("34px");
                                addComponent(profilePic);
                                Label userName = new Label("");
                                userName.setSizeUndefined();
                                addComponent(userName);
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.