Package org.phylowidget.ui

Examples of org.phylowidget.ui.PhyloTree$NewickUpdater


  // parseMe = s;
  // trigger(200);
  // }

  public void run() {
    PhyloTree t = new PhyloTree();
    TreeIO.setOldTree(PhyloWidget.trees.getTree());// In this method newick String for uploaded
    // tree (oldnewick String) is saved ..
                            // Madhu..
    PhyloWidget.trees.setTree(TreeIO.parseNewickString(t, parseMe));
  }
View Full Code Here


  public synchronized void paste(RootedTree destTree, PhyloNode destNode)
  {
    if (isEmpty())
      throw new Error("Called TreeClipboard.paste() with empty clipboard");
    // Translate the newick string into a RooteTree.
    PhyloTree tree = new PhyloTree();
    TreeIO.parseNewickString(tree, newickString);
    // Add the clone's vertices and edges to the destination tree.
    synchronized (destTree)
    {
      Graphs.addGraph(destTree, tree);
      // Insert the clone's root vertex into the midpoint above destNode.
      if (destTree.getParentOf(destNode) == null)
      {
        destTree.addEdge(destNode, tree.getRoot());
      } else
      {
        Object internalVertex = destTree.createAndAddVertex("");
        destTree.insertNodeBetween(destTree.getParentOf(destNode),
            destNode, internalVertex);
        destTree.addEdge(internalVertex, tree.getRoot());
      }

      if (origTree != null)
      {
        if (origVertex.getState() == PhyloNode.CUT)
View Full Code Here

    /*
     * If we have a hovered node, always draw it.
     */
    if (tree instanceof PhyloTree)
    {
      PhyloTree pt = (PhyloTree) tree;
      PhyloNode h = pt.hoveredNode;
      if (h != null)
      {
        Point point = new Point(getX(h), getY(h));
        float dist = (float) point.distance(mousePt);
View Full Code Here

     * If we've got a PhyloTree on our hands,
     * let's take care of the hovered node.
     */
    if (tree instanceof PhyloTree)
    {
      PhyloTree pt = (PhyloTree) tree;
      PhyloNode h = pt.hoveredNode;
      if (h != null && h.getParent() != null)
      {
        canvas.stroke(style.hoverColor.getRGB());
        float weight = baseStroke * style.hoverStroke;
 
View Full Code Here

  // parseMe = s;
  // trigger(200);
  // }

  public void run() {
    PhyloTree t = new PhyloTree();
    TreeIO.setOldTree(PhyloWidget.trees.getTree());// In this method newick String for uploaded
    // tree (oldnewick String) is saved ..
    // Madhu..
    PhyloWidget.trees.setTree(TreeIO.parseNewickString(t, parseMe));
  }
View Full Code Here

        trees.clear();
        trees.add(tree);
        getRenderer().setTree(tree);
        if (tree instanceof PhyloTree)
        {
          PhyloTree pt = (PhyloTree) tree;
          pt.setSynchronizedWithJS(true);
        }
        fforwardMe = true;
        mutator = new RandomTreeMutator(tree);
      }
    };
View Full Code Here

TOP

Related Classes of org.phylowidget.ui.PhyloTree$NewickUpdater

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.