toString () method added
authoramwaterhouse <Andrew Waterhouse>
Thu, 19 May 2005 17:47:12 +0000 (17:47 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 19 May 2005 17:47:12 +0000 (17:47 +0000)
src/jalview/analysis/NJTree.java

index 7f4850e..46d2844 100755 (executable)
@@ -46,7 +46,12 @@ public class NJTree {
   public NJTree(SequenceNode node) {\r
     top = node;\r
     maxheight = findHeight(top);\r
+  }\r
 \r
+  public String toString()\r
+  {\r
+    jalview.io.NewickFile fout = new jalview.io.NewickFile(getTopNode());\r
+    return fout.print(false,true); // distances only\r
   }\r
 \r
   public NJTree(SequenceI[] seqs, NewickFile treefile) {\r