Package com.vaadin.ui

Examples of com.vaadin.ui.Label.addStyleName()


        wrapper.setId("label" + "COMPONENT_OTHER");
        parent.addComponent(wrapper);

        Label extra = new Label(
                "Extra label that is not part of the wrapper. This should be dragged along with COMPONENT_OTHER.");
        extra.addStyleName("extra");
        parent.addComponent(extra);

        return parent;
    }
View Full Code Here


    public MenuBars() {
        setMargin(true);
        setSpacing(true);

        Label h1 = new Label("Menu Bars");
        h1.addStyleName("h1");
        addComponent(h1);

        MenuBar menuBar = getMenuBar();
        menuBar.setCaption("Normal style");
        addComponent(menuBar);
View Full Code Here

        menuBar.addStyleName("borderless");
        menuBar.addStyleName("small");
        addComponent(menuBar);

        Label h2 = new Label("Drop Down Button");
        h2.addStyleName("h2");
        addComponent(h2);

        HorizontalLayout wrap = new HorizontalLayout();
        wrap.addStyleName("wrapping");
        wrap.setSpacing(true);
View Full Code Here

        split.addStyleName("color1");
        split.addStyleName("small");
        wrap.addComponent(split);

        h2 = new Label("Split Button");
        h2.addStyleName("h2");
        addComponent(h2);

        wrap = new HorizontalLayout();
        wrap.addStyleName("wrapping");
        wrap.setSpacing(true);
View Full Code Here

    private Component createHeader() {
        HorizontalLayout header = new HorizontalLayout();
        header.addStyleName("header-background");
        Label title = new Label("...Title...");
        title.addStyleName("header-title");
        header.addComponent(title);
        Button logout = new Button("Logout");
        logout.addListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
View Full Code Here

        if (content != null) {
            l.setValue(content);
        }

        if (primaryStyleName != null) {
            l.addStyleName(primaryStyleName);
        }

        if (iconUrl != null) {
            l.setIcon(new ThemeResource(iconUrl));
        }
View Full Code Here

    protected Component buildRootUpperBar() {

        // Title
        Label titleLabel = new Label(rootTitle);
        titleLabel.addStyleName("pexp-application-title");
        titleLabel.setSizeUndefined();
        titleLabel.setHeight(18, Sizeable.Unit.PIXELS);
        subtitleLabel.setSizeUndefined();
        VerticalLayout titleLayout = new VerticalLayout();
        titleLayout.setSizeUndefined();
View Full Code Here

        layout.setWidth("500px");
        layout.setHeight("500px");

        Label lbl = new Label("Label");
        lbl.setStyleName("my-label");
        lbl.addStyleName("my-second-label");
        layout.addComponent(lbl);

        Button btn = new Button("Button");
        btn.setStyleName("my-button");
        btn.addStyleName("my-second-button");
View Full Code Here

        lbl.setSizeUndefined();
        l.addComponent(lbl);

        lbl = new Label("Second (margin 10px)");
        lbl.setSizeUndefined();
        lbl.addStyleName("hugemargin");
        l.addComponent(lbl);

        lbl = new Label("Third (margin+xr)");
        lbl.setSizeUndefined();
        lbl.addStyleName("hugemargin");
View Full Code Here

        lbl.addStyleName("hugemargin");
        l.addComponent(lbl);

        lbl = new Label("Third (margin+xr)");
        lbl.setSizeUndefined();
        lbl.addStyleName("hugemargin");
        l.addComponent(lbl);

        Panel p = new Panel(l.getClass().getSimpleName(), l);
        p.setWidth("600px");
        p.setHeight("200px");
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.