Examples of CssLayout


Examples of com.vaadin.ui.CssLayout

public class DragAndDropFiles extends TestBase {

    @Override
    protected void setup() {
        CssLayout cssLayout = new CssLayout() {
            @Override
            protected String getCss(Component c) {
                return "display: block; padding:20px; border: 2px dotted black; background: #aaa;";
            }
        };
        Component l = new Label("Drag file on me");
        l.setSizeUndefined();
        cssLayout.addComponent(l);
        DragAndDropWrapper dragAndDropWrapper = new DragAndDropWrapper(
                cssLayout);
        dragAndDropWrapper.setSizeUndefined();
        dragAndDropWrapper.setDropHandler(new DropHandler() {
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        TextField tf;

        VerticalLayout vl;

        CssLayout cssLayout = new CssLayout() {
            @Override
            protected String getCss(Component c) {
                return "margin-top: 20px; background:red;";
            }
        };

        vl = new VerticalLayout();
        vl.setHeight("40px");
        vl.setWidth("200px");

        tf = new TextField();
        tf.setSizeFull();
        vl.addComponent(tf);
        vl.setCaption("Fullsize textfield in 40px height 200px width box");
        cssLayout.addComponent(vl);

        vl = new VerticalLayout();
        vl.setHeight("40px");
        vl.setWidth("200px");

        TextArea ta = new TextArea();
        ta.setRows(2); // make it text area, instead of oneliner
        ta.setSizeFull();
        vl.addComponent(ta);
        vl.setCaption("Fullsize textarea in 100px height 200px width box");
        cssLayout.addComponent(vl);

        vl = new VerticalLayout();
        vl.setSizeUndefined();

        tf = new TextField();
        vl.addComponent(tf);
        vl.setCaption("Normal textfield in natural size.");
        cssLayout.addComponent(vl);

        getLayout().addComponent(cssLayout);

    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

                gridLayout.setStyleName("borders");
            }
            l = gridLayout;
        } else if (layoutClass == CssLayout.class) {
            if (cssLayout == null) {
                cssLayout = new CssLayout();
                cssLayout.setStyleName("borders");
            }
            l = cssLayout;
        } else if (layoutClass == FormLayout.class) {
            if (formLayout == null) {
View Full Code Here

Examples of com.vaadin.ui.CssLayout

public class SplitPanelStyleLeak extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        CssLayout wrap = new CssLayout();
        addComponent(wrap);

        wrap.addComponent(getSplit(true, null));
        wrap.addComponent(getSplit(false, null));

        wrap.addComponent(getSplit(true, "small"));
        wrap.addComponent(getSplit(false, "small"));

        wrap.addComponent(getSplit(true, "large"));
        wrap.addComponent(getSplit(false, "large"));
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

    void buildMainView() {
        mainLayout.setWidth("100%");
        mainLayout.setHeight("400px");
        mainLayout.addComponent(getTopMenu());

        CssLayout margin = new CssLayout();
        margin.setSizeFull();
        tabs = new TabSheet();
        tabs.setSizeFull();
        margin.addComponent(tabs);
        mainLayout.addComponent(margin);
        mainLayout.setExpandRatio(margin, 1);

        tabs.addComponent(buildLabels());
        tabs.addComponent(buildButtons());
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        return l;
    }

    Layout buildWindows() {
        final CssLayout l = new CssLayout();
        l.setCaption("Windows");

        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        final Window w = new Window("Normal window", layout);
        w.setWidth("280px");
View Full Code Here

Examples of com.vaadin.ui.CssLayout

    private CssLayout layout;

    @Override
    protected void setup() {
        setTheme("tests-tickets");
        layout = new CssLayout() {
            @Override
            protected String getCss(com.vaadin.ui.Component c) {
                return css.get(c);
            }
        };
View Full Code Here

Examples of com.vaadin.ui.CssLayout

public class CssLayoutTest extends AbstractIndexedLayoutTest {

    @Override
    protected Layout createLayout() {
        return new CssLayout();
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        });
        addComponent(cb2);
        gl.setWidth("1000px");
        gl.setHeight("500px");

        CssLayout ta = new CssLayout();
        ta.setSizeFull();
        // Only on last row
        gl.addComponent(ta, 0, 3, 3, 3);

        gl.setRowExpandRatio(3, 1);
        addComponent(gl);
View Full Code Here

Examples of com.vaadin.ui.CssLayout

    }

    @Override
    protected void setup() {

        final CssLayout log = new CssLayout();
        log.setWidth("100%");

        final Table table = new Table() {
            @Override
            public Property<?> getContainerProperty(Object itemId,
                    Object propertyId) {
                log("Fetched container property \"" + propertyId
                        + "\" for item \"" + itemId + "\"");
                return super.getContainerProperty(itemId, propertyId);
            }

            private void log(String string) {
                log.addComponent(new Label(string));

            }
        };

        table.addContainerProperty("foo", String.class, "bar");
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.