Package com.vaadin.ui

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


        Table t = new Table();
        t.addContainerProperty("name", String.class, null);
        for (int i = 0; i < 10; i++) {
            String id = which + " " + i;
            t.addItem(new String[] { id }, id);
        }
        t.setId(which + "Table");
        t.setItemCaptionPropertyId("name");
        t.setSizeFull();
View Full Code Here


        imageTable.setPageLength(1);
        imageTable.addGeneratedColumn("image", new ImageGenerator());
        imageTable.setWidth(500, Unit.PIXELS);

        for (int i = 1; i <= 25; i++) {
            imageTable.addItem(new Integer(i));
        }

        imageTable.setCurrentPageFirstItemIndex(index);

        vl.addComponent(new Button("Click", new Button.ClickListener() {
View Full Code Here

        verticalLayout.addComponent(button);
        verticalLayout.addComponent(label1);

        Table table = new Table();
        table.addContainerProperty("Field", TextField.class, null);
        Object id = table.addItem();
        TextField tf = new TextField();
        table.getItem(id).getItemProperty("Field").setValue(tf);

        verticalLayout.addComponent(table);
View Full Code Here

        for (int i = 0; i < COLS; i++) {
            t.addContainerProperty("COLUMN_" + i, String.class, "");
        }
        for (int row = 0; row < ROWS; row++) {
            Item i = t.addItem(String.valueOf(row));
            for (int col = 0; col < COLS; col++) {
                Property<String> p = i.getItemProperty("COLUMN_" + col);
                p.setValue("item " + row + "/" + col);
            }
        }
View Full Code Here

                            + (new Date()).toString());
                    System.out.println(b.getUI().getSession());

                }
            }));
            t.addItem(content.toArray(), "" + i);
        }
        t.setRowHeaderMode(Table.ROW_HEADER_MODE_ID);
        return t;
    }
View Full Code Here

    protected void setup() {
        final Table table = new Table();
        table.setSizeFull();
        table.addContainerProperty("Name", String.class, null);
        for (int i = 0; i < 200; i++) {
            table.addItem(new Object[] { "Item " + i }, i);
        }

        table.setSelectable(true);
        table.addListener(new ItemClickListener() {
            public void itemClick(ItemClickEvent event) {
View Full Code Here

        tbl.setIcon(icon);
        tbl.addContainerProperty("Column 1", String.class, "Row", "Column 1",
                icon, Align.LEFT);
        tbl.addContainerProperty("Column 2", String.class, "Row", "Column 2",
                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);
View Full Code Here

        tbl.addContainerProperty("Column 1", String.class, "Row", "Column 1",
                icon, Align.LEFT);
        tbl.addContainerProperty("Column 2", String.class, "Row", "Column 2",
                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);
View Full Code Here

                icon, Align.LEFT);
        tbl.addContainerProperty("Column 2", String.class, "Row", "Column 2",
                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
View Full Code Here

                label.setValue(String.valueOf(selected.size()));
            }
        });

        for (int i = 0; i < TOTAL_NUMBER_OF_ROWS; i++) {
            Object itemId = table.addItem();
            table.getContainerProperty(itemId, "row").setValue("row " + i);
        }
    }

    @Override
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.