Examples of Tree


Examples of org.apache.wicket.markup.html.tree.Tree

    // construct the panel
    add(new RecursivePanel("panels", l1));

    // create a tree
    TreeModel treeModel = convertToTreeModel(l1);
    final Tree tree = new Tree("tree", treeModel)
    {
      protected String renderNode(TreeNode node)
      {
        DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)node;
        Object userObject = treeNode.getUserObject();
        return (userObject instanceof List) ? "<subtree>" : String.valueOf(treeNode
            .getUserObject());
      }
    };
    // disable ajax links in this example
    tree.setLinkType(LinkType.REGULAR);

    add(tree);
    add(new Link("expandAll")
    {
      public void onClick()
      {
        tree.getTreeState().expandAll();
      }
    });

    add(new Link("collapseAll")
    {
      public void onClick()
      {
        tree.getTreeState().collapseAll();
      }
    });

    add(new BookmarkablePageLink("ajaxTreeLink", SimpleTreePage.class));
  }
View Full Code Here

Examples of org.beryl.gui.widgets.Tree

    } else {
      object.element.removeAttribute("name");
      object.widget.setName(null);
    }
    object.treeNode.setText(WidgetTree.describeWidget(object.element));
    Tree tree = (Tree) object.treeNode.getParentWidgetByClass(Tree.class);
    tree.nodeChanged(object.treeNode);
  }
View Full Code Here

Examples of org.bukkit.material.Tree

                Misc.dropItems(blockState.getLocation(), block.getDrops());
            }
            else {
                //TODO Remove this workaround when casting to Tree works again
                if (blockState.getData() instanceof Tree) {
                    Tree tree = (Tree) blockState.getData();
                    tree.setDirection(BlockFace.UP);
                }

                switch (material) {
                    case LOG:
                    case LOG_2:
View Full Code Here

Examples of org.eclipse.egit.github.core.Tree

              .format("Existing ref {0} points to a {1} ({2}) instead of a commmit",
                  ref.getRef(), ref.getObject().getType(),
                  ref.getObject().getSha()));

    // Write tree
    Tree tree;
    try {
      int size = entries.size();
      if (size != 1)
        info(MessageFormat.format(
            "Creating tree with {0} blob entries", size));
      else
        info("Creating tree with 1 blob entry");
      String baseTree = null;
      if (merge && ref != null) {
        Tree currentTree = service.getCommit(repository,
            ref.getObject().getSha()).getTree();
        if (currentTree != null)
          baseTree = currentTree.getSha();
        info(MessageFormat.format("Merging with tree {0}", baseTree));
      }
      if (!dryRun)
        tree = service.createTree(repository, entries, baseTree);
      else
        tree = new Tree();
    } catch (IOException e) {
      throw new MojoExecutionException("Error creating tree: "
          + getExceptionMessage(e), e);
    }
View Full Code Here

Examples of org.eclipse.jgit.lib.Tree

    final ObjectId cFileId2 = inserter.insert(OBJ_BLOB, encode("c-2"));

    // Create sub-a/empty, sub-c/empty = hello.
    final ObjectId oldTree;
    {
      final Tree root = new Tree(db);
      {
        final Tree subA = root.addTree("sub-a");
        subA.addFile("empty").setId(aFileId);
        subA.setId(inserter.insert(OBJ_TREE, subA.format()));
      }
      {
        final Tree subC = root.addTree("sub-c");
        subC.addFile("empty").setId(cFileId1);
        subC.setId(inserter.insert(OBJ_TREE, subC.format()));
      }
      oldTree = inserter.insert(OBJ_TREE, root.format());
    }

    // Create sub-a/empty, sub-b/empty, sub-c/empty.
    final ObjectId newTree;
    {
      final Tree root = new Tree(db);
      {
        final Tree subA = root.addTree("sub-a");
        subA.addFile("empty").setId(aFileId);
        subA.setId(inserter.insert(OBJ_TREE, subA.format()));
      }
      {
        final Tree subB = root.addTree("sub-b");
        subB.addFile("empty").setId(bFileId);
        subB.setId(inserter.insert(OBJ_TREE, subB.format()));
      }
      {
        final Tree subC = root.addTree("sub-c");
        subC.addFile("empty").setId(cFileId2);
        subC.setId(inserter.insert(OBJ_TREE, subC.format()));
      }
      newTree = inserter.insert(OBJ_TREE, root.format());
    }
    inserter.flush();
    inserter.release();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.columnCategories.Tree

    private Tree tree;

    @Before
    public void setup() {
        tree = new Tree();

        Node root = newNode("R");
        tree.setRootElement(root);

        root.addChild(newNode("a"));
View Full Code Here

Examples of org.eclipse.persistence.internal.libraries.antlr.runtime.tree.Tree

  public MismatchedTreeNodeException() {
  }

  public MismatchedTreeNodeException(int expecting, TreeNodeStream input) {
    super(input);
    Tree t = (Tree)input.LT(1);
    if ( input.LT(1) instanceof Tree ) {
      line = t.getLine();
      charPositionInLine = t.getCharPositionInLine();
      // TODO: if DOWN/UP, there is no line info currently
    }
    this.expecting = expecting;
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Tree

  public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    container.setLayout(layout);
    _treeViewer = createTreeViewer(container);
    Tree treeWidget = _treeViewer.getTree();
    GridData gridDataTree = new GridData(GridData.FILL_BOTH);
    gridDataTree.horizontalSpan = 3;
    gridDataTree.widthHint = convertWidthInCharsToPixels(80);
    gridDataTree.heightHint = convertHeightInCharsToPixels(20);
    treeWidget.setLayoutData(gridDataTree);
    treeWidget.addSelectionListener(this);   
    setControl(container);
    performValidation();
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Tree

      return null;
    }

    /* Item is Root-Leveld */
    Tree tree = fItem.getParent();
    int index = tree.indexOf(fItem);

    if (tree.getItemCount() > index + 1)
      return new WidgetTreeNode(tree.getItem(index + 1), fViewer);

    return null;
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Tree

      });
    }
  }

  private void updateSelectionAfterDelete(Runnable runnable) {
    Tree tree = (Tree) getControl();
    IStructuredSelection selection = (IStructuredSelection) getSelection();

    /* Nothing to do, since no selection */
    if (selection.isEmpty()) {
      runnable.run();
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.