Package com.vaadin.ui

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


        table.addContainerProperty("Lähettäjä", String.class, "");
        table.addContainerProperty("Viestin tyyppi", String.class, "");

        for (int i = 0; i < 15; i++) {

            table.addItem(new Object[] { i + " Joku Ihminen", "Testiviesti" },

            new Object());

        }
View Full Code Here


        t.addContainerProperty("string", String.class, null);
        t.addContainerProperty("button", Component.class, null);

        for (int i = 0; i < 10; i++) {
            t.addItem(i);
            t.getContainerProperty(i, "string").setValue(String.valueOf(i));
            t.getContainerProperty(i, "button")
                    .setValue(new Button("Click me"));
        }
View Full Code Here

        // Any component sending an UIDL request when rendered will likely do
        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));
        }
        addComponent(table);
    }
View Full Code Here

                        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
            }
        });

        for (int i = 0; i < 50; i++) {
            table.addItem();
        }

        addComponent(table);
    }
View Full Code Here

        {
            final Table tbl = new Table();
            tbl.addContainerProperty("column", String.class,
                    "drag/drop to/from here");
            for (int i = 0; i < 5; i++) {
                tbl.addItem();
            }
            addComponent(tbl);
            tbl.setDragMode(TableDragMode.ROW);
            tbl.setDropHandler(new DropHandler() {
View Full Code Here

                    return AcceptAll.get();
                }

                @Override
                public void drop(DragAndDropEvent event) {
                    tbl.getItem(tbl.addItem()).getItemProperty("column")
                            .setValue("You dropped something");
                }
            });
            final CheckBox enabled = new CheckBox("Enabled", true);
            addComponent(enabled);
View Full Code Here

    protected void setup(VaadinRequest request) {
        getSession().setConverterFactory(new MyConverterFactory());
        Table t = new Table();
        t.addContainerProperty("String column", String.class, "");
        t.addContainerProperty("Integer column", Integer.class, "");
        t.addItem(new Object[] { "Second column is 1", 1 }, "item1");
        t.addItem(new Object[] { "Second column is 4589", 4589 }, "item2");

        addComponent(t);
    }
View Full Code Here

        getSession().setConverterFactory(new MyConverterFactory());
        Table t = new Table();
        t.addContainerProperty("String column", String.class, "");
        t.addContainerProperty("Integer column", Integer.class, "");
        t.addItem(new Object[] { "Second column is 1", 1 }, "item1");
        t.addItem(new Object[] { "Second column is 4589", 4589 }, "item2");

        addComponent(t);
    }

    @Override
View Full Code Here

        t.addContainerProperty("name", String.class, "NA");

        for (Integer i = 0; i < COLS; i++) {
            t.addContainerProperty(i, Integer.class, Integer.valueOf(0));
        }
        t.addItem("1").getItemProperty("name").setValue("Ares");
        t.addItem("2").getItemProperty("name").setValue("Bob");
        t.addItem("3").getItemProperty("name").setValue("Coral");
        t.addItem("4").getItemProperty("name").setValue("David");
        t.addItem("5").getItemProperty("name").setValue("Emma");
View Full Code Here

        for (Integer i = 0; i < COLS; i++) {
            t.addContainerProperty(i, Integer.class, Integer.valueOf(0));
        }
        t.addItem("1").getItemProperty("name").setValue("Ares");
        t.addItem("2").getItemProperty("name").setValue("Bob");
        t.addItem("3").getItemProperty("name").setValue("Coral");
        t.addItem("4").getItemProperty("name").setValue("David");
        t.addItem("5").getItemProperty("name").setValue("Emma");

        addComponent(t);
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.