Package com.vaadin.ui

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


        t.setContainerDataSource(idx);
        t.setId("perseys");
        t.addItem("Foo");
        t.addItem("Bar");
        t.addItem("Bar1");
        t.addItem("Bar2");
        t.addItem("Bar3");
        t.addItem("Bar4");
        t.addItem("Bar5");
        t.addItem("Child");
        t.setParent("Child", "Foo");
View Full Code Here


        t.setId("perseys");
        t.addItem("Foo");
        t.addItem("Bar");
        t.addItem("Bar1");
        t.addItem("Bar2");
        t.addItem("Bar3");
        t.addItem("Bar4");
        t.addItem("Bar5");
        t.addItem("Child");
        t.setParent("Child", "Foo");
        t.setSizeFull();
View Full Code Here

        t.addItem("Foo");
        t.addItem("Bar");
        t.addItem("Bar1");
        t.addItem("Bar2");
        t.addItem("Bar3");
        t.addItem("Bar4");
        t.addItem("Bar5");
        t.addItem("Child");
        t.setParent("Child", "Foo");
        t.setSizeFull();
        t.setDragMode(TreeDragMode.NODE);
View Full Code Here

        t.addItem("Bar");
        t.addItem("Bar1");
        t.addItem("Bar2");
        t.addItem("Bar3");
        t.addItem("Bar4");
        t.addItem("Bar5");
        t.addItem("Child");
        t.setParent("Child", "Foo");
        t.setSizeFull();
        t.setDragMode(TreeDragMode.NODE);
View Full Code Here

        t.addItem("Bar1");
        t.addItem("Bar2");
        t.addItem("Bar3");
        t.addItem("Bar4");
        t.addItem("Bar5");
        t.addItem("Child");
        t.setParent("Child", "Foo");
        t.setSizeFull();
        t.setDragMode(TreeDragMode.NODE);

        /*
 
View Full Code Here

     */
    private Tree createTree(int rootItems, int children, boolean expand) {
        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);

View Full Code Here

                tree.collapseItemsRecursively(rootId);

            }
            for (int j = 0; j < children; j++) {
                String childId = "child " + i + "/" + j;
                tree.addItem(childId);
                tree.setParent(childId, rootId);
                tree.setChildrenAllowed(childId, false);
                if (j == 4) {
                    tree.setChildrenAllowed(childId, true);
                    Object grandChildId = tree.addItem();
View Full Code Here

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

        final Tree t = new Tree(
                "Tree with criteria from AbstractSelect (OverItem, ContainsItem). Foo can be dragged anywhere, anything can be dropped on Foo or Bar. Bar5 subtree is also valid drop target.");

        final HierarchicalContainer idx = new HierarchicalContainer();
        t.setContainerDataSource(idx);
        t.addItem("Foo");
        t.addItem("Bar");
        t.addItem("Bar1");
        t.addItem("Bar2");
        t.addItem("Bar3");
        t.addItem("Bar4");
View Full Code Here

                "Tree with criteria from AbstractSelect (OverItem, ContainsItem). Foo can be dragged anywhere, anything can be dropped on Foo or Bar. Bar5 subtree is also valid drop target.");

        final HierarchicalContainer idx = new HierarchicalContainer();
        t.setContainerDataSource(idx);
        t.addItem("Foo");
        t.addItem("Bar");
        t.addItem("Bar1");
        t.addItem("Bar2");
        t.addItem("Bar3");
        t.addItem("Bar4");
        t.addItem("Bar5");
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.