Package com.vaadin.ui

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


                            .getContainerPropertyIds().iterator().next());

                }
            } else if (c instanceof ComponentContainer) {
                ComponentContainer new_name = (ComponentContainer) c;
                new_name.addComponent(new Label("component 1 in test container"));
                new_name.addComponent(new Button("component 2"));
            } else if (c instanceof Embedded) {
                Embedded em = (Embedded) c;
                em.setSource(new ThemeResource("test.png"));
            } else if (c instanceof Label) {
View Full Code Here


                }
            } else if (c instanceof ComponentContainer) {
                ComponentContainer new_name = (ComponentContainer) c;
                new_name.addComponent(new Label("component 1 in test container"));
                new_name.addComponent(new Button("component 2"));
            } else if (c instanceof Embedded) {
                Embedded em = (Embedded) c;
                em.setSource(new ThemeResource("test.png"));
            } else if (c instanceof Label) {
                ((Label) c).setValue("Test label");
View Full Code Here

            @Override
            public void buttonClick(Button.ClickEvent event) {
                try {
                    ComponentContainer target = targetClass.newInstance();
                    for (int i = 0; i < 61; i++) {
                        target.addComponent(new TextField("Test"));
                    }
                    parent.setContent(target);
                } catch (InstantiationException e) {
                    throw new RuntimeException(e);
                } catch (IllegalAccessException e) {
View Full Code Here

            throws InstantiationException, IllegalAccessException {
        ComponentContainer container = containerClass.newInstance();
        for (String size : sizes) {
            Label title = new Label("<h3>" + size + "x" + size + "</h3>",
                    ContentMode.HTML);
            container.addComponent(title);
            for (String icon : icons) {
                ThemeResource res = new ThemeResource("../runo/icons/" + size
                        + "/" + icon);
                if (TYPE_CAPTION.equals(iconType)) {
                    Label name = new Label();
View Full Code Here

                        + "/" + icon);
                if (TYPE_CAPTION.equals(iconType)) {
                    Label name = new Label();
                    name.setCaption(icon);
                    name.setIcon(res);
                    container.addComponent(name);
                } else if (TYPE_EMBEDDED.equals(iconType)) {
                    Embedded e = new Embedded(icon, res);
                    container.addComponent(e);
                }
            }
View Full Code Here

                    name.setCaption(icon);
                    name.setIcon(res);
                    container.addComponent(name);
                } else if (TYPE_EMBEDDED.equals(iconType)) {
                    Embedded e = new Embedded(icon, res);
                    container.addComponent(e);
                }
            }
        }

        return container;
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.