Package com.google.gwt.user.cellview.client

Examples of com.google.gwt.user.cellview.client.CellBrowser$TreeNode


    /*
     * Create the browser using the model. We use <code>null</code> as the
     * default value of the root node. The default value will be passed to
     * CustomTreeModel#getNodeInfo();
     */
    CellBrowser browser = new CellBrowser(model, null);
    browser.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);

    // Add the browser to the root layout panel.
    RootLayoutPanel.get().add(browser);
  }
View Full Code Here


    /*
     * Create the browser using the model. We specify the default value of the
     * hidden root node as "Item 1".
     */
    CellBrowser tree = new CellBrowser(model, "Item 1");

    // Add the tree to the root layout panel.
    RootLayoutPanel.get().add(tree);
  }
View Full Code Here

    private TreeModelBase     _treeModel;
    private HtmlTree          _tree;

    public TreeNode getTreeData()
    {
        TreeNode treeData = new TreeNodeBase("foo-folder", "Inbox", false);

        // construct a set of fake data (normally your data would come from a database)

        // populate Frank's portion of the tree
        TreeNodeBase personNode = new TreeNodeBase("person", "Frank Foo", false);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo", false));
        TreeNodeBase folderNode = new TreeNodeBase("foo-folder", "Requires Foo Reviewer", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "X050001", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050003", true));
        personNode.getChildren().add(folderNode);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo Recommendation", false));
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Approval", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "J050001", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050003", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "E050011", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "R050002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "C050003", true));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Processing", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "X050003", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050011", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "F050002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "G050003", true));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Approval", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "J050006", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050007", true));
        personNode.getChildren().add(folderNode);

        treeData.getChildren().add(personNode);

        // populate Betty's portion of the tree
        personNode = new TreeNodeBase("person", "Betty Bar", false);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo", false));
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Reviewer", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "X012000", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X013000", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X014000", true));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Recommendation", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "J010026", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J020002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J030103", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "E030214", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "R020444", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "C010000", true));
        personNode.getChildren().add(folderNode);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo Approval", false));
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Processing", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "T052003", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "T020011", true));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Approval", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "J010002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J030047", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "F030112", true));
        personNode.getChildren().add(folderNode);

        treeData.getChildren().add(personNode);

        return treeData;
    }
View Full Code Here

*/
public class TreeBacker
{
    public TreeNode getTreeData()
    {
        TreeNode treeData = new TreeNodeBase("foo-folder", "Inbox", true);

        // construct a set of fake data (normally your data would come from a database)

        // populate Frank's portion of the tree
        TreeNodeBase personNode = new TreeNodeBase("person", "Frank Foo", true);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo", true));
        TreeNodeBase folderNode = new TreeNodeBase("foo-folder", "Requires Foo Reviewer", true);
        folderNode.getChildren().add(new TreeNodeBase("document", "X050001", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050002", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050003", false));
        personNode.getChildren().add(folderNode);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo Recommendation", true));
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Approval", true);
        folderNode.getChildren().add(new TreeNodeBase("document", "J050001", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050002", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050003", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "E050011", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "R050002", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "C050003", false));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Processing", true);
        folderNode.getChildren().add(new TreeNodeBase("document", "X050003", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050011", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "F050002", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "G050003", false));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Approval", true);
        folderNode.getChildren().add(new TreeNodeBase("document", "J050006", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050007", false));
        personNode.getChildren().add(folderNode);

        treeData.getChildren().add(personNode);

        // populate Betty's portion of the tree
        personNode = new TreeNodeBase("person", "Betty Bar", true);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo", true));
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Reviewer", true);
        folderNode.getChildren().add(new TreeNodeBase("document", "X012000", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "X013000", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "X014000", false));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Recommendation", true);
        folderNode.getChildren().add(new TreeNodeBase("document", "J010026", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "J020002", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "J030103", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "E030214", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "R020444", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "C010000", false));
        personNode.getChildren().add(folderNode);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo Approval", true));
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Processing", true);
        folderNode.getChildren().add(new TreeNodeBase("document", "T052003", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "T020011", false));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Approval", true);
        folderNode.getChildren().add(new TreeNodeBase("document", "J010002", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "J030047", false));
        folderNode.getChildren().add(new TreeNodeBase("document", "F030112", false));
        personNode.getChildren().add(folderNode);

        treeData.getChildren().add(personNode);

        return treeData;
    }
View Full Code Here

        return treeData;
    }

    public TreeNode getSimpleTreeData()
    {
        TreeNode treeData = new TreeNodeBase("branch", "Inbox", true);

        // construct a set of fake data (normally your data would come from a database)

        // populate Frank's portion of the tree
        TreeNodeBase branchNode = new TreeNodeBase("branch", "Frank Foo", true);
        branchNode.getChildren().add(new TreeNodeBase("branch", "Requires Foo", true));
        TreeNodeBase folderNode = new TreeNodeBase("branch", "Requires Foo Reviewer", true);
        folderNode.getChildren().add(new TreeNodeBase("leaf", "X050001", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "X050002", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "X050003", false));
        branchNode.getChildren().add(folderNode);
        branchNode.getChildren().add(new TreeNodeBase("branch", "Requires Foo Recommendation", true));
        folderNode = new TreeNodeBase("branch", "Requires Foo Approval", true);
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J050001", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J050002", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J050003", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "E050011", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "R050002", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "C050003", false));
        branchNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("branch", "Requires Bar Processing", true);
        folderNode.getChildren().add(new TreeNodeBase("leaf", "X050003", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "X050011", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "F050002", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "G050003", false));
        branchNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("branch", "Requires Bar Approval", true);
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J050006", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J050007", false));
        branchNode.getChildren().add(folderNode);

        treeData.getChildren().add(branchNode);

        // populate Betty's portion of the tree
        branchNode = new TreeNodeBase("branch", "Betty Bar", true);
        branchNode.getChildren().add(new TreeNodeBase("branch", "Requires Foo", true));
        folderNode = new TreeNodeBase("branch", "Requires Foo Reviewer", true);
        folderNode.getChildren().add(new TreeNodeBase("leaf", "X012000", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "X013000", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "X014000", false));
        branchNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("branch", "Requires Foo Recommendation", true);
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J010026", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J020002", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J030103", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "E030214", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "R020444", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "C010000", false));
        branchNode.getChildren().add(folderNode);
        branchNode.getChildren().add(new TreeNodeBase("branch", "Requires Foo Approval", true));
        folderNode = new TreeNodeBase("branch", "Requires Bar Processing", true);
        folderNode.getChildren().add(new TreeNodeBase("leaf", "T052003", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "T020011", false));
        branchNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("branch", "Requires Bar Approval", true);
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J010002", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "J030047", false));
        folderNode.getChildren().add(new TreeNodeBase("leaf", "F030112", false));
        branchNode.getChildren().add(folderNode);

        treeData.getChildren().add(branchNode);

        return treeData;

    }
View Full Code Here

    private TreeModelBase _treeModel;
    private HtmlTree _tree;

    public TreeNode getTreeData()
    {
        TreeNode treeData = new TreeNodeBase("foo-folder", "Inbox", false);

        // construct a set of fake data (normally your data would come from a database)

        // populate Frank's portion of the tree
        TreeNodeBase personNode = new TreeNodeBase("person", "Frank Foo", false);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo", false));
        TreeNodeBase folderNode = new TreeNodeBase("foo-folder", "Requires Foo Reviewer", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "X050001", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050003", true));
        personNode.getChildren().add(folderNode);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo Recommendation", false));
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Approval", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "J050001", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050003", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "E050011", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "R050002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "C050003", true));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Processing", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "X050003", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X050011", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "F050002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "G050003", true));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Approval", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "J050006", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J050007", true));
        personNode.getChildren().add(folderNode);

        treeData.getChildren().add(personNode);

        // populate Betty's portion of the tree
        personNode = new TreeNodeBase("person", "Betty Bar", false);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo", false));
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Reviewer", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "X012000", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X013000", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "X014000", true));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("foo-folder", "Requires Foo Recommendation", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "J010026", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J020002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J030103", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "E030214", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "R020444", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "C010000", true));
        personNode.getChildren().add(folderNode);
        personNode.getChildren().add(new TreeNodeBase("foo-folder", "Requires Foo Approval", false));
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Processing", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "T052003", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "T020011", true));
        personNode.getChildren().add(folderNode);
        folderNode = new TreeNodeBase("bar-folder", "Requires Bar Approval", false);
        folderNode.getChildren().add(new TreeNodeBase("document", "J010002", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "J030047", true));
        folderNode.getChildren().add(new TreeNodeBase("document", "F030112", true));
        personNode.getChildren().add(folderNode);

        treeData.getChildren().add(personNode);

        return treeData;
    }
View Full Code Here

    FolderBean folderBean = (FolderBean) FacesContext
    .getCurrentInstance().getApplication().createValueBinding(
        FolderBean.BEAN_REF).getValue(
        FacesContext.getCurrentInstance());
   
    TreeNode treeNode = this.treeModel.getNode();
    String identifier = treeNode.getIdentifier();
    CollectionDao collectionDao = CollectionDao.createInstance();
    Collection collection = collectionDao.retrieve(identifier);
    List allViewFolders = new ArrayList();
    List elem = populateAllViewFolders(collection,
        allViewFolders);
View Full Code Here

    return allViewFolders;
  }

  public String seeFolder() {

    TreeNode treeNode = this.treeModel.getNode();
    String identifier = treeNode.getIdentifier();

    FolderDao folderDao = FolderDao.createInstance();
    Folder folder = folderDao.retrieve(identifier);

    FolderBean folderBean = (FolderBean) FacesContext
View Full Code Here

    return "exploration_folder_description";
  }

  public void downloadFileAction(ActionEvent event) throws IOException {

    TreeNode treeNode = this.treeModel.getNode();
    String identifier = treeNode.getIdentifier();

    StoredFileDao fileDao = StoredFileDao.createInstance();
    StoredFile file = fileDao.retrieve(identifier);

    FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here

        }
        return true;
    }

    protected void encodeCurrentNode(FacesContext context, ResponseWriter out, HtmlTree tree) throws IOException {
        TreeNode node = tree.getNode();

        // set configurable values
        boolean showRootNode = getBoolean(tree, JSFAttr.SHOW_ROOT_NODE, true);
        boolean showNav = getBoolean(tree, JSFAttr.SHOW_NAV, true);
        boolean showLines = getBoolean(tree, JSFAttr.SHOW_LINES, true);
        boolean clientSideToggle = getBoolean(tree, JSFAttr.CLIENT_SIDE_TOGGLE, true);

        if (clientSideToggle) {
            // we must show the nav icons if client side toggle is enabled (regardless of what user says)
            showNav = true;
        }

        UIComponent nodeTypeFacet = tree.getFacet(node.getType());
        UIComponent nodeImgFacet = null;

        if (nodeTypeFacet == null) {
            throw new IllegalArgumentException("Unable to locate facet with the name: " + node.getType());
        }

        // render node padding
        String[] pathInfo = tree.getPathInformation(tree.getNodeId());
        int paddingLevel = pathInfo.length - 1;
View Full Code Here

TOP

Related Classes of com.google.gwt.user.cellview.client.CellBrowser$TreeNode

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.