From: amwaterhouse Date: Tue, 14 Jun 2005 10:41:25 +0000 (+0000) Subject: Load/Save trees X-Git-Tag: Release_2_0~55 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=06b5f3c06a09ad8e32431be9eb560ec68e7f3770;p=jalview.git Load/Save trees --- diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index addba63..34502f1 100755 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -53,6 +53,7 @@ public class Jalview2XML "UTF-8")); Vector shortNames = new Vector(); + int treeCount=1; //REVERSE ORDER for (int i = frames.length - 1; i > -1; i--) @@ -103,8 +104,9 @@ public class Jalview2XML } } + // USE THIS METHOD TO SAVE A SINGLE ALIGNMENT WINDOW - public static void SaveState(AlignFrame af, String jarFile, String fileName) + public static void SaveAlignment(AlignFrame af, String jarFile, String fileName) { try { @@ -175,9 +177,39 @@ public class Jalview2XML } //SAVE TREES + /////////////////////////////////// if (af.viewport.currentTree != null) { - object.getVamsasModel().addTree(af.viewport.currentTree.toString()); + // FIND ANY ASSOCIATED TREES + JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + for(int t=0; t 0) + //LOAD TREES + /////////////////////////////////////// + /* JInternalFrame[] frames = Desktop.desktop.getAllFrames(); +for(int t=0; t 0) { try { - af.ShowNewickTree(new jalview.io.NewickFile( - (String) object.getVamsasModel().getTree(0)), "Tree"); + for(int t = 0; t