Package com.vaadin.ui

Examples of com.vaadin.ui.Table.addItem()


        for (int i = 0; i < properties; i++) {
            t.addContainerProperty("Property " + i, String.class, null);
        }

        for (int j = 0; j < items; j++) {
            Item item = t.addItem("Item " + j);
            for (int i = 0; i < properties; i++) {
                item.getItemProperty("Property " + i).setValue(
                        "Item " + j + "/Property " + i);
            }
        }
View Full Code Here


        Table t = new Table();
        t.addContainerProperty("property 1", String.class, "");
        t.addContainerProperty("property 2", String.class, "");
        t.addContainerProperty("property 3", String.class, "");
        for (int i = 1; i < 10; i++) {
            t.addItem(new Object[] { "row/col " + i + "/1",
                    "row/col " + i + "/2", "row/col " + i + "/3" },
                    String.valueOf(i));
        }
        return t;
    }
View Full Code Here

                view.setContainerDataSource(metaContainer);

            }
        });
        view.addContainerProperty("Column", String.class, "Click for NPE");
        view.addItem(new Object());

        addComponent(view);

    }
View Full Code Here

    private Table createTable(String caption) {
        Table table = new Table(caption);
        table.addContainerProperty("value", String.class, "");
        for (int i = 0; i < 10; i++) {
            table.addItem(new Object[] { caption + " value " + i },
                    Integer.valueOf(i));
        }
        table.setWidth("300px");
        return table;
    }
View Full Code Here

                }
            });
            button.setDescription("Yep yep");
            button.setComponentError(new UserError("Error"));
            content.add(button);
            t.addItem(content.toArray(), "" + i);
        }
        return t;
    }

    static String[] testString = new String[] { "Jacob", "Michael", "Joshua",
View Full Code Here

            string2.replaceAll("\"", ""); // remove surrounding ""
            table.addContainerProperty(string2, String.class, "");
        }
        for (int i = 1; i < rows.length; i++) {
            String[] split = rows[i].split(",");
            table.addItem(split, "" + i);
        }
        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        Window w = new Window(file.getName(), layout);
        layout.setSizeUndefined();
View Full Code Here

    protected void setup() {

        Table table = new Table();
        table.addContainerProperty("A", String.class, "");
        for (int i = 0; i < 100; i++) {
            table.addItem(new Object[] { Integer.toString(i) },
                    Integer.valueOf(i));
        }

        table.setDragMode(TableDragMode.ROW);
        table.setDropHandler(new DropHandler() {
View Full Code Here

    private Table createTable(String caption) {
        Table table = new Table(caption);
        table.addContainerProperty("value", String.class, "");
        for (int i = 0; i < 10; i++) {
            table.addItem(new Object[] { caption + " value " + i },
                    Integer.valueOf(i));
        }
        table.setWidth("300px");
        return table;
    }
View Full Code Here

        t.addContainerProperty("nimi", String.class, "");
        t.setVisibleColumns(new Object[] { "pno", "testi", "testi2", "nimi" });

        t.setSelectable(true);

        Item i = t.addItem(1);
        i.getItemProperty("pno").setValue("1");
        i.getItemProperty("testi").setValue("12.12.08");
        VerticalLayout ol = new VerticalLayout();
        ol.setWidth("100%");
        ol.setHeight(null);
View Full Code Here

        Table table1 = new Table();
        table1.setSizeFull();
        table1.addContainerProperty("Column", String.class, "");
        for (int i = 1; i <= 100; i++) {
            table1.addItem(new Object[] { "Value " + i }, i);
        }
        left.addComponent(table1);
        left.setExpandRatio(table1, 1);

        VerticalSplitPanel split2 = new VerticalSplitPanel();
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.