Examples of expandItemsRecursively()


Examples of com.vaadin.ui.Tree.expandItemsRecursively()

        tree.addItem("Root");
        tree.setItemIcon("Root", icon);
        tree.addItem("Leaf");
        tree.setItemIcon("Leaf", icon);
        tree.setParent("Leaf", "Root");
        tree.expandItemsRecursively("Root");
        tree.addActionHandler(actionHandler);
        gl.addComponent(tree);

        // All of FontAwesome
        String allIcons = "";
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

        assertEquals(rootIds.get(0), lastExpanded);

        // Expand should send one event for each expanded item id.
        // In this case root + child 4
        expandCalled = 0;
        tree.expandItemsRecursively(rootIds.get(1));
        assertEquals(2, expandCalled);
        List<Object> c = new ArrayList<Object>(tree.getChildren(rootIds.get(1)));

        assertEquals(c.get(4), lastExpanded);
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

        Tree tree = new Tree();
        for (int i = 0; i < rootItems; i++) {
            String rootId = "root " + i;
            tree.addItem(rootId);
            if (expand) {
                tree.expandItemsRecursively(rootId);
            } else {
                tree.collapseItemsRecursively(rootId);

            }
            for (int j = 0; j < children; j++) {
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

                    tree.setChildrenAllowed(childId, true);
                    Object grandChildId = tree.addItem();
                    tree.setParent(grandChildId, childId);
                    tree.setChildrenAllowed(grandChildId, false);
                    if (expand) {
                        tree.expandItemsRecursively(childId);
                    } else {
                        tree.collapseItemsRecursively(childId);
                    }
                }
            }
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

        }
        getLayout().addComponent(tree);

        // Expand all items
        for (Iterator<?> it = tree.rootItemIds().iterator(); it.hasNext();) {
            tree.expandItemsRecursively(it.next());
        }

        // Set the tree in drag source mode
        tree.setDragMode(TreeDragMode.NODE);
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

        Tree tree = new Tree();
        tree.setContainerDataSource(getHardwareContainer());
        tree.setItemCaptionPropertyId(hw_PROPERTY_NAME);
        for (Iterator<?> it = tree.rootItemIds().iterator(); it.hasNext();) {
            tree.expandItemsRecursively(it.next());
        }
        treeLayout.addComponent(tree);
    }

    @Override
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

                return "This is a tooltip for item id '" + itemId + "'";
            }
        });

        for (Object rootItems : tree.rootItemIds()) {
            tree.expandItemsRecursively(rootItems);
        }

        addComponent(tree);
    }
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

    private Tree createTree() {
        final Tree tree = new Tree(null, createContainer());
        tree.setWidth("300px");
        for (Object rootItems : tree.rootItemIds()) {
            tree.expandItemsRecursively(rootItems);
        }
        tree.setChildrenAllowed("Item 73", false);

        tree.setDragMode(TreeDragMode.NODE);
        tree.setDropHandler(new DropHandler() {
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

            }

        }

        for (Object id : tree.rootItemIds()) {
            tree.expandItemsRecursively(id);
        }

        layout.addComponent(filler1);
        layout.addComponent(filler2);
        layout.addComponent(tree);
View Full Code Here

Examples of com.vaadin.ui.Tree.expandItemsRecursively()

            }
        });

        // Expand whole tree
        for (Object id : tree.rootItemIds()) {
            tree.expandItemsRecursively(id);
        }

        parent.addComponent(tree);
    }
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.