From: amwaterhouse Date: Fri, 9 Dec 2005 11:13:18 +0000 (+0000) Subject: Only load the tree file once, for first alignment X-Git-Tag: Release_2_07~20 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8b4b5ed1b7165be4cc2efac0326c3b7ef3a3f3a4;p=jalview.git Only load the tree file once, for first alignment --- 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()); - - } }