From 06b5f3c06a09ad8e32431be9eb560ec68e7f3770 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 14 Jun 2005 10:41:25 +0000 Subject: [PATCH] Load/Save trees --- src/jalview/gui/Jalview2XML.java | 91 +++++++++++++++++++++++++++++++++++--- 1 file changed, 85 insertions(+), 6 deletions(-) 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