Package com.vaadin.ui

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


            setCompositionRoot(mainLayout);

            Component table = new Table();
            table.setWidth("100%");
            table.setId(TABLE);
            mainLayout.addComponent(table);
        }
    }

    @Override
    protected String getTestDescription() {
View Full Code Here


            form.setSizeUndefined();
            date.setResolution(DateField.RESOLUTION_MIN);
            form.addComponent(date);
            form.addComponent(kilomiters);
            form.addComponent(title);
            main.addComponent(form);

        }

        public void loadRun(Workout run) {
            if (run == null) {
View Full Code Here

        final Window window = new Window("Test window");
        addWindow(window);

        final Layout layout1 = new VerticalLayout();
        Button button1 = new Button("Button 1");
        layout1.addComponent(button1);

        final Layout layout2 = new VerticalLayout();
        Button button2 = new Button("Button 2");
        layout2.addComponent(button2);
View Full Code Here

        Button button1 = new Button("Button 1");
        layout1.addComponent(button1);

        final Layout layout2 = new VerticalLayout();
        Button button2 = new Button("Button 2");
        layout2.addComponent(button2);

        window.setContent(layout1);

        button1.addListener(new ClickListener() {
View Full Code Here

        tree1.setContainerDataSource(hier);
        tree1.setItemCaptionPropertyId("name");
        for (Object id : hier.rootItemIds()) {
            tree1.expandItemsRecursively(id);
        }
        l.addComponent(tree1);

        // This contains a bug, changes not reflected back to client
        Button modify = new Button("Modify and sort (has a bug)",
                new ClickListener() {
                    private static final long serialVersionUID = 1L;
View Full Code Here

                        // setContainerDataSource for server-side changes to be
                        // reflected back to client-side
                        sort(indexedContainer);
                    }
                });
        l.addComponent(modify);

        Table t = new Table("Table with indexed container", indexedContainer);

        l.addComponent(t);
    }
View Full Code Here

                });
        l.addComponent(modify);

        Table t = new Table("Table with indexed container", indexedContainer);

        l.addComponent(t);
    }

    @Override
    protected String getDescription() {
        return "Items should be in same order as in wrapped container after sorting.";
View Full Code Here

        Layout ol = new GridLayout(1, 2);
        p = new Panel("Panel", ol);
        p.setSizeFull();
        Label l = new Label("Spacer");
        l.setHeight("400px");
        ol.addComponent(l);

        embedded = new Embedded(null, new ThemeResource(
                "icons/64/folder-add.png"));
        layout.addComponent(embedded);
        Button b = new Button(
View Full Code Here

                        embedded = newEmbedded;

                    }

                });
        ol.addComponent(b);

        b = new Button("Change image source (is fine)", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here

            }

        });

        ol.addComponent(b);
        layout.addComponent(p);
    }
}
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.