Examples of CssLayout


Examples of com.vaadin.ui.CssLayout

*
*/
public class CustomDDImplementation extends CustomComponent {

    public CustomDDImplementation() {
        Layout l = new CssLayout();
        l.addComponent(new MyDropTarget());
        l.addComponent(new MyDragSource());
    }
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

@SuppressWarnings("serial")
public class CssLayoutRemoveComponent extends TestBase {

    @Override
    protected void setup() {
        final CssLayout layout = new CssLayout();
        final TextField tf = new TextField("Caption1");
        Button b = new Button("Remove field ", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                layout.removeComponent(tf);
            }

        });
        layout.addComponent(tf);
        layout.addComponent(b);
        layout.addComponent(new TextField("Caption2"));
        layout.addComponent(new TextField("Caption3"));

        addComponent(layout);
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        ui = new UI() {
            @Override
            protected void init(VaadinRequest request) {
            }
        };
        content = new CssLayout();
        component = new Label();

        attachListener = control.createMock(AttachListener.class);
        detachListener = control.createMock(DetachListener.class);
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

                );
    }

    private Component getPanelTest() {
        Layout cssLayout = new CssLayout();
        cssLayout.setCaption("Panel");

        final VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        final Panel p = new Panel(pl);
        p.setHeight("400px");
        Label l50 = null;
        for (int i = 0; i < 100; i++) {
            Label c = new Label("Label" + i);
            pl.addComponent(c);
            if (i == 50) {
                l50 = c;
            }
        }

        final Label l = l50;
        Button button = new Button("Scroll to label 50",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        getLayout().getUI().scrollIntoView(l);
                    }
                });
        cssLayout.addComponent(button);
        button = new Button("Scroll to 100px", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                p.setScrollTop(100);
            }
        });
        cssLayout.addComponent(button);
        cssLayout.addComponent(p);
        return cssLayout;
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        sp.addComponent(getBigComponent());
        return sp;
    }

    private Component getSimpleTableTest() {
        CssLayout cssLayout = new CssLayout();
        final Table table = new Table();

        Button button = new Button("Toggle lazyloading");
        button.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                if (table.getCacheRate() == 100) {
                    table.setCacheRate(2);
                    table.setPageLength(15);
                } else {
                    table.setCacheRate(100);
                    table.setHeight("400px");
                }
            }
        });
        cssLayout.addComponent(button);

        button = new Button("Toggle selectable");
        button.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                table.setSelectable(!table.isSelectable());
            }
        });
        cssLayout.addComponent(button);

        table.addContainerProperty("foo", String.class, "bar");
        table.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);
        for (int i = 0; i < 1000; i++) {
            table.addItem();
        }
        cssLayout.addComponent(table);
        cssLayout.setCaption("Table");
        return cssLayout;
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        addComponent(createWrappedTextField(new HorizontalLayout()));
        AbsoluteLayout al = new AbsoluteLayout();
        al.setWidth("400px");
        al.setHeight("100px");
        addComponent(createWrappedTextField(al));
        addComponent(createWrappedTextField(new CssLayout()));
    }
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        button = new Button("Icon on right");
        button.setIcon(testIcon.get());
        button.addStyleName("icon-align-right");
        row.addComponent(button);

        CssLayout group = new CssLayout();
        group.addStyleName("v-component-group");
        row.addComponent(group);

        button = new Button("One");
        group.addComponent(button);
        button = new Button("Two");
        group.addComponent(button);
        button = new Button("Three");
        group.addComponent(button);

        button = new Button("Tiny");
        button.addStyleName("tiny");
        row.addComponent(button);
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        tf.setValue("Image, no caption");
        tf.addStyleName("inline-icon");
        tf.setIcon(testIcon.get(true, 16));
        row.addComponent(tf);

        CssLayout group = new CssLayout();
        group.addStyleName("v-component-group");
        row.addComponent(group);

        tf = new TextField();
        tf.setInputPrompt("Grouped with a button");
        tf.addStyleName("inline-icon");
        tf.setIcon(testIcon.get());
        tf.setWidth("260px");
        group.addComponent(tf);

        Button button = new Button("Do It");
        // button.addStyleName("primary");
        group.addComponent(button);

        tf = new TextField("Borderless");
        tf.setInputPrompt("Write hereā€¦");
        tf.addStyleName("inline-icon");
        tf.addStyleName("borderless");
View Full Code Here

Examples of com.vaadin.ui.CssLayout

        return c;
    }

    /** Create new CssLayout and add it to current component container. */
    public CssLayout csslayout() {
        CssLayout c = new CssLayout();
        c.setImmediate(true);
        add(c);
        return c;
    }
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.