Package org.apache.myfaces.custom.tree2

Examples of org.apache.myfaces.custom.tree2.TreeModel


        // Build the tree.
        TreeNode tn = new CommentTreeNode();
        tn.setType("comments"); tn.setLeaf(false);

        // Create the tree:
        TreeModel tm = new TreeModelBase(tn);

        // Add child nodes:
        this.getChildComments(tm, tn, cmts);
       
        // Add a child for the reply box:
View Full Code Here


     *
     * @return TreeModel
     */
    public TreeModel getExpandedTreeData()
    {
        return new TreeModelBase(getTreeData());
    }
View Full Code Here

     *
     * @return TreeModel
     */
    public TreeModel getExpandedTreeData()
    {
        return new TreeModelBase(getTreeData());
    }
View Full Code Here

  /**
   * Create the table model based on the root object.
   * @param root root node object.
   */
  protected Object createTreeModel(Object root) {
    return new TreeModelBase((TreeNodeBase)root);
  }
View Full Code Here

           
            for (int i = 0; i < currentMetadata.getRootElement().getElements().size(); i++) {
                paths.add("0:" + (metadataCount) + ":0:" + i);
            }
        }
        TreeModelBase tmb = new TreeModelBase(treeData);
        for (Iterator it = paths.iterator(); it.hasNext(); ) {
            String path = (String) it.next();
            tmb.getTreeState().expandPath(tmb.getPathInformation(path));
        }
        tmb.getTreeState().collapsePath(new String[]{"0:0"});
       
        return tmb;
    }
View Full Code Here

           
            for (int i = 0; i < 50; i++) {
                paths.add("0:" + (metadataCount) + ":0:" + i);
            }
        }
        TreeModelBase tmb = new TreeModelBase(treeData);
        for (Iterator it = paths.iterator(); it.hasNext(); ) {
            String path = (String) it.next();
            tmb.getTreeState().expandPath(tmb.getPathInformation(path));
        }
        tmb.getTreeState().collapsePath(new String[]{"0:0"});
       
        return tmb;
    }
View Full Code Here

        CustomTreeNode treeData = new CustomTreeNode("root", "", true);
        if (rootVersion != null) {
            treeData = this.addVersionTreeNode(rootVersion);
        }
       
        return new TreeModelBase(treeData);
    }
View Full Code Here

//            }
        }
        if (metadataCount > 0) {
          metadataEmpty = true;
        }
        TreeModelBase tmb = new TreeModelBase(treeData);
        TreeState ts = new TreeStateBase();       
        for (Iterator it = paths.iterator(); it.hasNext(); ) {
            String path = (String) it.next();
            ts.toggleExpanded(path);
        }
        tmb.setTreeState(ts);
        //tmb.getTreeState().collapsePath(new String[]{"0:0"});
        return tmb;
    }
View Full Code Here

  }

  public String toggleRootCollectionMenu() {
    this.rootCollectionMenuOpen = !this.rootCollectionMenuOpen;
    if (!this.rootCollectionMenuOpen) {
      this.treeModel = new TreeModelBase(getTreeNode());
    }
    return "";
  }
View Full Code Here

        this.selectedFolder = this.workspaceBean.getSelectedFolder();
    }
   
    public TreeModel getMetadataTreeModel() {
        if (this.metadataTreeModel == null) {
            this.metadataTreeModel = new TreeModelBase(getTreeData());
        }
        return this.metadataTreeModel;
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.custom.tree2.TreeModel

Copyright © 2018 www.massapicom. 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.