Package com.vaadin.ui

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


            if (i == 0) {
                b.setSizeFull();
                elh.setExpandRatio(b, 1);
            }
        }
        lo.addComponent(elph);
        elph.setWidth("300px");
        elph.setHeight("300px");

    }
}
View Full Code Here


            int counter = 0;

            @Override
            public void buttonClick(ClickEvent event) {

                gridLayout
                        .addComponent(new TextField("Content " + (++counter)));

            }
        });
View Full Code Here

        GridLayout gl = new GridLayout(units.length, sizes.length);
        main.addComponent(gl);
        for (int i = 0; i < sizes.length; i++) {
            for (int j = 0; j < units.length; j++) {
                String s = sizes[i] + units[j];
                gl.addComponent(new Button(s, this));
            }
        }

        gl.addComponent(new Button("null", new Button.ClickListener() {
View Full Code Here

                String s = sizes[i] + units[j];
                gl.addComponent(new Button(s, this));
            }
        }

        gl.addComponent(new Button("null", new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                c.setWidth(null);
                c.setHeight(null);
View Full Code Here

        gl.setWidth(100, Unit.PERCENTAGE);
        windowLayout.addComponent(gl);

        ListSelect listSelect = new ListSelect();
        listSelect.setWidth(100, Unit.PERCENTAGE);
        gl.addComponent(listSelect);
        gl.setMargin(true);

        final Button testButton = new Button("Open Window",
                new Button.ClickListener() {
                    @Override
View Full Code Here

                e.printStackTrace();
                continue;
            }
            c.setCaption(clazz.getSimpleName());
            c.setIcon(icon);
            gl.addComponent(c);
        }

        // TabSheet, caption + tab icons
        TabSheet tabs = new TabSheet();
        tabs.setCaption("TabSheet");
View Full Code Here

        tabs.setIcon(icon);
        tabs.addStyleName("myTabs");
        tabs.addTab(new Label("Content 1"), "Tab 1", icon);
        tabs.addTab(new Label("Content 2"), "Tab 2", icon);
        tabs.setWidth("150px");
        gl.addComponent(tabs);

        // Accordion, caption + tab icons
        Accordion acc = new Accordion();
        acc.setCaption("Accordion");
        acc.setIcon(icon);
View Full Code Here

        Accordion acc = new Accordion();
        acc.setCaption("Accordion");
        acc.setIcon(icon);
        acc.addTab(new Label(), "Section 1", icon);
        acc.addTab(new Label(), "Section 2", icon);
        gl.addComponent(acc);

        // Table, caption + column + row + action icons
        Table tbl = new Table("Table");
        tbl.setRowHeaderMode(RowHeaderMode.ICON_ONLY);
        tbl.setIcon(icon);
View Full Code Here

                icon, Align.LEFT);
        tbl.setItemIcon(tbl.addItem(), icon);
        tbl.setItemIcon(tbl.addItem(), icon);
        tbl.setItemIcon(tbl.addItem(), icon);
        tbl.setPageLength(3);
        gl.addComponent(tbl);
        tbl.addActionHandler(actionHandler);

        // Selects, caption + item icons
        Class<?>[] selects = { ComboBox.class, NativeSelect.class,
                ListSelect.class, TwinColSelect.class, OptionGroup.class };
View Full Code Here

            sel.setIcon(icon);
            sel.addItem("One");
            sel.setItemIcon("One", icon);
            sel.addItem("Two");
            sel.setItemIcon("Two", icon);
            gl.addComponent(sel);
        }

        // MenuBar, caption + item + sub-item icons
        MenuBar menu = new MenuBar();
        menu.setIcon(icon);
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.