Package com.vaadin.ui

Examples of com.vaadin.ui.AbstractOrderedLayout.addComponent()


        layout1.addComponent(children[1]);

        layout2.addComponent(children[2]);
        layout2.addComponent(children[3]);

        layout2.addComponent(children[1], 1);
        assertOrder(layout1, new int[] { 0 });
        assertOrder(layout2, new int[] { 2, 1, 3 });

        layout1.addComponent(children[3], 0);
        assertOrder(layout1, new int[] { 3, 0 });
View Full Code Here


        layout1.addComponent(children[3], 0);
        assertOrder(layout1, new int[] { 3, 0 });
        assertOrder(layout2, new int[] { 2, 1 });

        layout2.addComponent(children[0]);
        assertOrder(layout1, new int[] { 3 });
        assertOrder(layout2, new int[] { 2, 1, 0 });

        layout1.addComponentAsFirst(children[1]);
        assertOrder(layout1, new int[] { 1, 3 });
View Full Code Here

        ol.setMargin(true);
        ol.setSpacing(true);
        if (style != null) {
            ol.setStyleName(style);
        }
        ol.addComponent(new Label(descr));
        for (int i = 0; i < 3; i++) {
            Button b = new Button("Row " + (i + 1));
            if (!horizontal) {
                b.setWidth("500px");
            }
View Full Code Here

        for (int i = 0; i < 3; i++) {
            Button b = new Button("Row " + (i + 1));
            if (!horizontal) {
                b.setWidth("500px");
            }
            ol.addComponent(b);
        }
        getMainWindow().addComponent(ol);
    }

}
View Full Code Here

                            Component child = currentLayout.getComponent(0);
                            Alignment alignment = currentLayout
                                    .getComponentAlignment(child);
                            float expRatio = currentLayout
                                    .getExpandRatio(child);
                            newLayout.addComponent(child);
                            newLayout.setExpandRatio(child, expRatio);
                            newLayout.setComponentAlignment(child, alignment);

                        }
                        newLayout.setStyleName("theLayout");
View Full Code Here

                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            layout.setHeight("300px");
            layout.setWidth("200px");
            layout.addComponent(components[i]);
            layout.setComponentAlignment(components[i], alignments[i]);
            if (i < components.length / 2) {
                l1.addComponent(layout);
            } else {
                l2.addComponent(layout);
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.