From 8b4b5ed1b7165be4cc2efac0326c3b7ef3a3f3a4 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 9 Dec 2005 11:13:18 +0000 Subject: [PATCH] Only load the tree file once, for first alignment --- src/jalview/bin/JalviewLite.java | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index d5801df..be4675f 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -28,6 +28,7 @@ import java.applet.*; import java.awt.*; import java.awt.event.*; +import jalview.appletgui.TreePanel; /** @@ -243,6 +244,32 @@ public class JalviewLite extends Applet if(featuresFile!=null) currentAlignFrame.parseFeaturesFile(featuresFile); + String treeFile = applet.getParameter("treeFile"); + if (treeFile != null) + { + try + { + jalview.io.NewickFile fin = new jalview.io.NewickFile(applet. + getCodeBase() + treeFile, "URL"); + fin.parse(); + + if (fin.getTree() != null) + { + TreePanel tp = null; + tp = new TreePanel(currentAlignFrame.viewport, + currentAlignFrame.viewport.getAlignment().getSequences(), + fin, "FromFile", applet.getCodeBase() + treeFile); + jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500); + currentAlignFrame.addTreeMenuItem(tp, treeFile); + } + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + + String pdbfile = applet.getParameter("PDBFILE"); if(pdbfile!=null) { @@ -256,8 +283,6 @@ public class JalviewLite extends Applet new MCview.AppletPDBViewer(pdbfile, "URL", (Sequence)currentAlignFrame.getAlignViewport().getAlignment().findName(sequence), currentAlignFrame.getSeqcanvas()); - - } } -- 1.7.10.2