getTree method added
authoramwaterhouse <Andrew Waterhouse>
Wed, 13 Apr 2005 16:36:18 +0000 (16:36 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 13 Apr 2005 16:36:18 +0000 (16:36 +0000)
src/jalview/gui/TreePanel.java

index eb0123f..9f9e327 100755 (executable)
@@ -29,6 +29,10 @@ public class TreePanel extends GTreePanel
   TreeCanvas treeCanvas;\r
   NJTree tree;\r
 \r
+  public NJTree getTree()\r
+  {\r
+    return tree;\r
+  }\r
 \r
   public TreePanel(AlignViewport av, Vector seqVector, String type, String pwtype, int s, int e)\r
   {\r
@@ -50,7 +54,6 @@ public class TreePanel extends GTreePanel
     }\r
 \r
     tree = new NJTree(seq, type, pwtype, start, end);\r
-    av.setCurrentTree(tree);\r
 \r
     treeCanvas = new TreeCanvas(av, tree, scrollPane, longestName);\r
 \r
@@ -80,8 +83,6 @@ public class TreePanel extends GTreePanel
       }\r
       // This constructor matches sequence names to treenodes and sets up the tree layouts.\r
       tree = new NJTree(seq, newtree);\r
-      av.setCurrentTree(tree);\r
-\r
 \r
       tree.reCount(tree.getTopNode());\r
       tree.findHeight(tree.getTopNode());\r