Package com.vaadin.terminal.gwt.client.ui

Examples of com.vaadin.terminal.gwt.client.ui.VTree$TreeNode


final public class VTargetInSubtree extends VAcceptCriterion {

    @Override
    protected boolean accept(VDragEvent drag, UIDL configuration) {

        VTree tree = (VTree) VDragAndDropManager.get().getCurrentDropHandler()
                .getPaintable();
        TreeNode treeNode = tree.getNodeByKey((String) drag.getDropDetails()
                .get("itemIdOver"));
        if (treeNode != null) {
            Widget parent2 = treeNode;
            int depth = configuration.getIntAttribute("depth");
            if (depth < 0) {
View Full Code Here


        } else if (VLink.class == classType) {
            return new VLink();
        } else if (VGridLayout.class == classType) {
            return new VGridLayout();
        } else if (VTree.class == classType) {
            return new VTree();
        } else if (VOptionGroup.class == classType) {
            return new VOptionGroup();
        } else if (VTwinColSelect.class == classType) {
            return new VTwinColSelect();
        } else if (VNativeSelect.class == classType) {
View Full Code Here

final public class VTargetInSubtree extends VAcceptCriterion {

    @Override
    protected boolean accept(VDragEvent drag, UIDL configuration) {

        VTree tree = (VTree) VDragAndDropManager.get().getCurrentDropHandler()
                .getPaintable();
        TreeNode treeNode = tree.getNodeByKey((String) drag.getDropDetails()
                .get("itemIdOver"));
        if (treeNode != null) {
            Widget parent2 = treeNode;
            int depth = configuration.getIntAttribute("depth");
            if (depth < 0) {
View Full Code Here

final public class VTargetInSubtree extends VAcceptCriterion {

    @Override
    protected boolean accept(VDragEvent drag, UIDL configuration) {

        VTree tree = (VTree) VDragAndDropManager.get().getCurrentDropHandler()
                .getPaintable();
        TreeNode treeNode = tree.getNodeByKey((String) drag.getDropDetails()
                .get("itemIdOver"));
        if (treeNode != null) {
            Widget parent2 = treeNode;
            int depth = configuration.getIntAttribute("depth");
            if (depth < 0) {
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

TOP

Related Classes of com.vaadin.terminal.gwt.client.ui.VTree$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.