Examples of CssLayout


Examples of com.vaadin.ui.CssLayout

    public static class Servlet extends VaadinServlet {
    }

    @Override
    protected void init(VaadinRequest request) {
        CssLayout container = new CssLayout();
        // Needed in order for contained components to size properly
        container.setWidth("100%");
        container.addStyleName("container");
        setContent(container);

        typography(container);
        tables(container);
        forms(container);
View Full Code Here

Examples of com.vaadin.ui.CssLayout

    static boolean isTestMode() {
        return ((ValoThemeUI) getCurrent()).testMode;
    }

    Component buildTestMenu() {
        CssLayout menu = new CssLayout();
        menu.addStyleName("large-icons");

        Label logo = new Label("Va");
        logo.setSizeUndefined();
        logo.setPrimaryStyleName("valo-menu-logo");
        menu.addComponent(logo);

        Button b = new Button(
                "Reference <span class=\"valo-menu-badge\">3</span>");
        b.setIcon(FontAwesome.TH_LIST);
        b.setPrimaryStyleName("valo-menu-item");
        b.addStyleName("selected");
        b.setHtmlContentAllowed(true);
        menu.addComponent(b);

        b = new Button("API");
        b.setIcon(FontAwesome.BOOK);
        b.setPrimaryStyleName("valo-menu-item");
        menu.addComponent(b);

        b = new Button("Examples <span class=\"valo-menu-badge\">12</span>");
        b.setIcon(FontAwesome.TABLE);
        b.setPrimaryStyleName("valo-menu-item");
        b.setHtmlContentAllowed(true);
        menu.addComponent(b);

        return menu;
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        setDate(date);
        date.setComponentError(new UserError("Fix it, now!"));
        date.addStyleName("borderless");
        row.addComponent(date);

        CssLayout group = new CssLayout();
        group.setCaption("Grouped with a Button");
        group.addStyleName("v-component-group");
        row.addComponent(group);

        final DateField date2 = new DateField();
        group.addComponent(date2);

        Button today = new Button("Today", new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                date2.setValue(new Date());
            }
        });
        group.addComponent(today);

        date = new DateField("Default resolution, explicit size");
        setDate(date);
        row.addComponent(date);
        date.setWidth("260px");
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        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);
        }
        components.add(documentLayout);

        final VerticalLayout buttonLayout = new VerticalLayout();
        final Button button = new Button("Button");
View Full Code Here

Examples of com.vaadin.ui.CssLayout

            table.addItem(new Object[] { new Integer(i) }, new Integer(i));
        }

        table.setCurrentPageFirstItemIndex(185);

        final CssLayout layout = new CssLayout();
        layout.addComponent(selectAllCheckbox);
        layout.addComponent(table);
        layout.setSizeFull();
        addComponent(layout);
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        hl.setWidth("100%");
        hl.setSpacing(true);
        hl.addComponent(prevButton);
        hl.addComponent(captionLabel);

        CssLayout group = new CssLayout();
        group.addStyleName("v-component-group");
        group.addComponent(dayButton);
        group.addComponent(weekButton);
        group.addComponent(monthButton);
        hl.addComponent(group);

        hl.addComponent(nextButton);
        hl.setComponentAlignment(prevButton, Alignment.MIDDLE_LEFT);
        hl.setComponentAlignment(captionLabel, Alignment.MIDDLE_CENTER);
View Full Code Here

Examples of com.vaadin.ui.CssLayout

@Theme("tests-responsive")
public class ResponsiveWidthAndHeight extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        CssLayout layout = new CssLayout();
        layout.addStyleName("width-and-height");
        layout.setSizeFull();
        setContent(layout);
        Responsive.makeResponsive(layout);

        layout.addComponent(new Label(
                "Resize the browser window in both dimensions to see the background color change."));
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        split.setSplitPosition(50, Unit.PERCENTAGE);
        split.setMinSplitPosition(100, Unit.PIXELS);
        split.setMaxSplitPosition(1200, Unit.PIXELS);
        setStyleName("responsive-test");

        CssLayout firstGrid = makeGrid("first");
        CssLayout secondGrid = makeGrid("second");
        CssLayout grids = new CssLayout();
        grids.setSizeFull();
        grids.addComponent(firstGrid);
        grids.addComponent(secondGrid);
        split.addComponent(grids);

        Label description = new Label(
                "<h3>This application demonstrates the Responsive extension in Vaadin.</h3>"
                        + "<p>Drag the splitter to see how the boxes on the left side adapt to "
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        Responsive.makeResponsive(secondGrid);
        Responsive.makeResponsive(description);
    }

    private CssLayout makeGrid(String styleName) {
        CssLayout grid = new CssLayout();
        grid.setWidth("100%");
        grid.addStyleName("grid");
        grid.addStyleName(styleName);

        for (int i = 1; i < 10; i++) {
            Label l = new Label("" + i);
            l.setSizeUndefined();
            grid.addComponent(l);
        }
        return grid;
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        absolutelayout = new AbsoluteLayout();
        absolutelayout.addComponentAttachListener(new MyAttachListener());
        absolutelayout.addComponentDetachListener(new MyDetachListener());

        csslayout = new CssLayout();
        csslayout.addComponentAttachListener(new MyAttachListener());
        csslayout.addComponentDetachListener(new MyDetachListener());
    }
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.