Examples of Tree


Examples of fr.soleil.comete.swing.Tree

    }

    private static JPanel initPanel() {

        final JPanel panel = new JPanel(new BorderLayout());
        final Tree tree = new Tree();

        URL fileURL = ArchivingCDMAPluginTest.class.getResource("testCouleurExpression.vc");
        File newFile = null;
        IDataset dataset = null;
        try {
            newFile = new File(fileURL.toURI());
            dataset = new VcDataset(newFile);
            dataset.open();

        } catch (IOException e1) {
            e1.printStackTrace();
        } catch (URISyntaxException e2) {
            e2.printStackTrace();
        }

        ITreeNode rootNode = new BasicTreeNode();
        constructTree(rootNode, dataset.getRootGroup());
        tree.setRootNode(rootNode);
        tree.addMouseListener(archivingListener);

        panel.add(tree, BorderLayout.CENTER);

        final JLabel label = new JLabel("Click here to loose focus");
View Full Code Here

Examples of fr.soleil.comete.swt.Tree

        GridData componentGridData = new GridData();
        componentGridData.verticalAlignment = SWT.BEGINNING;
        componentPanel.setLayoutData(componentGridData);

        Tree theComponent = new Tree(componentPanel, SWT.NONE);
        theComponent.setLayoutData(new RowData(150, 450));

        root = new BasicTreeNode();
        root.setName("ROOT");

        childString = new String[4];
        for (int i = 0; i < childString.length; i++) {
            childString[i] = "Child " + i;
            child = new BasicTreeNode();
            child.setName(childString[i]);
            root.addNodes(child);
        }

        theComponent.setRootNode(root);

        Group testPanelIComponent = IComponentTestPanel.getTestPanel(mainComposite, theComponent);
        Group testTreePanel = ITreeTestPanel.getTestPanel(mainComposite, theComponent);

        GridData iComponentGridData = new GridData();
View Full Code Here

Examples of fr.soleil.comete.swt.both.Tree

        imageData.grabExcessHorizontalSpace = true;
        imageData.grabExcessVerticalSpace = true;
        imageViewer.setLayoutData(imageData);

        // Tree
        tree = new Tree(parent, SWT.NONE);
        GridData treeData = new GridData(200, 300);
        treeData.verticalAlignment = GridData.BEGINNING;
        tree.setLayoutData(treeData);

        ITreeNode root = new BasicTreeNode();
View Full Code Here

Examples of fuse.zipfs.util.Tree

      rootEntry.setTime(zipFileTime);
      rootEntry.setSize(0);

      zipFileDataReader = new ZipFileDataReader(zipFile);

      tree = new Tree();
      tree.addNode(rootEntry.getName(), rootEntry);

      int files = 0;
      int dirs = 0;
      int blocks = 0;
View Full Code Here

Examples of javax.faces.tree.Tree

        // Look up the Tree that corresponds to this URI
        try {
            log.debug("selectTree(" + uri + ")");
            TreeFactory tfactory = (TreeFactory)
                FactoryFinder.getFactory(FactoryFinder.TREE_FACTORY);
            Tree tree = tfactory.getTree(context, uri);
            context.setTree(tree);
        } catch (FacesException e) {
            log.error("selectTree(" + uri + ")", e);
        }
View Full Code Here

Examples of jsynoptic.plugins.java3d.tree.Tree

   
    @Override
    public void newSourceComponent(NamedElementContainer c) {
        if (_tree == null) {
            _tree = new Tree(UniversePool.getGlobal(),this);
            JScrollPane sp = new JScrollPane(_tree);
            c.addElement(sp, NAME);
        }
    }
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.ruleeditor.util.Tree

    this.setDividerLocation(this.splitPaneHeight);
  }


  private JPanel generateTopComponent() {
    this.tree_rulePackages = new Tree(this.rulePackageContainer, that.editor);
    this.tree_rulePackages.addTreeSelectionListener(new TreeSelectionListener() {
      public void valueChanged(TreeSelectionEvent tse) {
        if(tse.isAddedPath()) {
          that.tree_unassigned.deSelect();
          that.currentTree = that.tree_rulePackages;
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.util.Tree

  }



  private Component generateComponent() {
    this.tree_documents = new Tree(this.documentContainer, this.that.visualRifEditor);

    this.tree_documents.addTreeSelectionListener(new TreeSelectionListener() {


      @Override
View Full Code Here

Examples of mesquite.lib.Tree

      setCurrentTaxaList(treeTaxonLabels);
      setCurrentTreeTaxa(treeTaxa);

      Enumeration e = treeVector.elements();
      while (e.hasMoreElements()) {
        Tree mesqTree = (Tree) e.nextElement();
        String newick = mesqTree.writeTreeByNames(true);

        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug(" tree=" + newick); //$NON-NLS-1$
        }

        // System.out.println(" tree: " + mesqTree.getName() + " " + newick);

        PhyloTree phyloTree = new PhyloTree();
        phyloTree.setLabel(mesqTree.getName());
        phyloTree.setNexusFileName(pFile.getName());
        phyloTree.setPublished(false);
        phyloTree.setRootedTree(mesqTree.getRooted());
        phyloTree.setNewickString(newick);
        phyloTree.setStudy(pStudy);
        // phyloTree.setBigTree(false); //TODO
        // phyloTree.setTreeType(treeType);
        // phyloTree.setTreeAttribute(pNewTreeAttribute);
        // phyloTree.setTreeQuality(pNewTreeQuality);

        int rootIndex = mesqTree.getRoot();
        PhyloTreeNode rootNode = createNode(mesqTree, null, rootIndex);
        phyloTree.addTreeNode(rootNode);
        phyloTree.setRootNode(rootNode);

        treeTraversal(mesqTree, rootIndex, rootNode);
View Full Code Here

Examples of net.opentsdb.tree.Tree

   * @param tsdb The TSDB to which we belong
   * @param query The HTTP query to work with
   * @throws BadRequestException if the request was invalid.
   */
  private void handleTree(TSDB tsdb, HttpQuery query) {
    final Tree tree;
    if (query.hasContent()) {
      tree = query.serializer().parseTreeV1();
    } else {
      tree = parseTree(query);
    }
   
    try {
      // if get, then we're just returning one or more trees
      if (query.getAPIMethod() == HttpMethod.GET) {
 
        if (tree.getTreeId() == 0) {
          query.sendReply(query.serializer().formatTreesV1(
              Tree.fetchAllTrees(tsdb).joinUninterruptibly()));
        } else {
          final Tree single_tree = Tree.fetchTree(tsdb, tree.getTreeId())
            .joinUninterruptibly();
          if (single_tree == null) {
            throw new BadRequestException(HttpResponseStatus.NOT_FOUND,
              "Unable to locate tree: " + tree.getTreeId());
          }
          query.sendReply(query.serializer().formatTreeV1(single_tree));
        }
 
      } else if (query.getAPIMethod() == HttpMethod.POST || query.getAPIMethod() == HttpMethod.PUT) {
        // For post or put, we're either editing a tree or creating a new one.
        // If the tree ID is missing, we need to create a new one, otherwise we
        // edit an existing tree.
       
        // if the tree ID is set, fetch, copy, save
        if (tree.getTreeId() > 0) {
          if (Tree.fetchTree(tsdb, tree.getTreeId())
              .joinUninterruptibly() == null) {
            throw new BadRequestException(HttpResponseStatus.NOT_FOUND,
                "Unable to locate tree: " + tree.getTreeId());
          } else {
            if (tree.storeTree(tsdb, (query.getAPIMethod() == HttpMethod.PUT))
                .joinUninterruptibly() != null) {
              final Tree stored_tree = Tree.fetchTree(tsdb, tree.getTreeId())
                .joinUninterruptibly();
              query.sendReply(query.serializer().formatTreeV1(stored_tree));
            } else {
              throw new BadRequestException(
                  HttpResponseStatus.INTERNAL_SERVER_ERROR,
                  "Unable to save changes to tre tree: " + tree.getTreeId(),
                  "Plesae try again at a later time");
            }
          }
        } else {
          // create a new tree
          final int tree_id = tree.createNewTree(tsdb).joinUninterruptibly();
          if (tree_id > 0) {
            final Tree stored_tree = Tree.fetchTree(tsdb, tree_id)
              .joinUninterruptibly();
            query.sendReply(query.serializer().formatTreeV1(stored_tree));
          } else {
            throw new BadRequestException(
                HttpResponseStatus.INTERNAL_SERVER_ERROR,
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.