Package com.vaadin.ui

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


        l.addComponent(new Label("baz"));
        tt.addItem(new Object[] { l, "VerticalLayout" }, 2);

        Label lbl = new Label("<b>foo</b><br/><i>bar</i>");
        lbl.setContentMode(Label.CONTENT_XHTML);
        tt.addItem(new Object[] { lbl, "Label" }, 3);

        tt.addItem(new Object[] { new Button("Test"), "Button" }, 4);
        tt.setParent(4, 3);
    }
View Full Code Here


        Label lbl = new Label("<b>foo</b><br/><i>bar</i>");
        lbl.setContentMode(Label.CONTENT_XHTML);
        tt.addItem(new Object[] { lbl, "Label" }, 3);

        tt.addItem(new Object[] { new Button("Test"), "Button" }, 4);
        tt.setParent(4, 3);
    }

    @Override
    protected String getDescription() {
View Full Code Here

        table.setPageLength(10);
        table.addContainerProperty("A", String.class, null);
        table.addContainerProperty("B", String.class, null);
        for (int i = 1; i <= 100; ++i) {
            int parentid = i;
            table.addItem(new Object[] { "A" + i, "B" + i }, parentid);
            for (int j = 1; j < 5; ++j) {
                int id = 1000 * i + j;
                table.addItem(new Object[] { "A" + i + "." + j,
                        "B" + i + "." + j }, id);
                table.setParent(id, parentid);
View Full Code Here

        for (int i = 1; i <= 100; ++i) {
            int parentid = i;
            table.addItem(new Object[] { "A" + i, "B" + i }, parentid);
            for (int j = 1; j < 5; ++j) {
                int id = 1000 * i + j;
                table.addItem(new Object[] { "A" + i + "." + j,
                        "B" + i + "." + j }, id);
                table.setParent(id, parentid);
            }
        }
        layout.addComponent(table);
View Full Code Here

    private void createTreeTableAndPopulate() {
        TreeTable tt = new TreeTable();
        tt.addContainerProperty("Foo", String.class, "");
        tt.addContainerProperty("Bar", String.class, "");

        Object item1 = tt.addItem(new Object[] { "Foo", "Bar" }, null);
        Object item2 = tt.addItem(new Object[] { "Foo2", "Bar2" }, null);

        tt.setParent(item2, item1);

        tt.setCollapsed(item1, false);
View Full Code Here

        TreeTable tt = new TreeTable();
        tt.addContainerProperty("Foo", String.class, "");
        tt.addContainerProperty("Bar", String.class, "");

        Object item1 = tt.addItem(new Object[] { "Foo", "Bar" }, null);
        Object item2 = tt.addItem(new Object[] { "Foo2", "Bar2" }, null);

        tt.setParent(item2, item1);

        tt.setCollapsed(item1, false);
View Full Code Here

        tt.addContainerProperty("Bar", String.class, "");
        tt.setColumnWidth("Bar", 100);
        tt.setIcon(icon);
        tt.setHeight(400, PIXELS);

        Object item1 = tt.addItem(new Object[] { "Foo", "Bar" }, null);
        Object item2 = tt.addItem(new Object[] { "Foo2", "Bar2" }, null);
        tt.setItemIcon(item1, icon);
        tt.setItemIcon(item2, icon);

        tt.setParent(item2, item1);
View Full Code Here

        tt.setColumnWidth("Bar", 100);
        tt.setIcon(icon);
        tt.setHeight(400, PIXELS);

        Object item1 = tt.addItem(new Object[] { "Foo", "Bar" }, null);
        Object item2 = tt.addItem(new Object[] { "Foo2", "Bar2" }, null);
        tt.setItemIcon(item1, icon);
        tt.setItemIcon(item2, icon);

        tt.setParent(item2, item1);
View Full Code Here

        t.addContainerProperty("First", String.class, null);
        t.addContainerProperty("Second", String.class, null);
        t.addContainerProperty("Third", String.class, null);

        for (int j = 1; j < 100; j++) {
            t.addItem(new Object[] { "Foo " + j, "Bar " + j, "Lorem " + j }, j);
        }
        Hierarchical hc = t.getContainerDataSource();
        hc.setChildrenAllowed(2, true);
        for (int j = 4; j < 100; j++) {
            hc.setParent(j, 2);
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.