From: amwaterhouse Date: Fri, 3 Feb 2006 17:39:41 +0000 (+0000) Subject: Reads annotation files X-Git-Tag: Root_VamJalview_2_07b+~183 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8f8dbc28e40a7e23e984882191ef2f9772bb1dbb;p=jalview.git Reads annotation files --- diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index 331e7f5..a26b9d0 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -81,15 +81,6 @@ public class JalviewLite extends Applet this.setBackground(new Color(r, g, b)); - - param = getParameter("features"); - if(param!=null) - { - if(param.indexOf("://")==-1) - param = getCodeBase() + param; - } - final String featuresFile = param; - file = getParameter("file"); if(file.indexOf("://")==-1) file = getCodeBase() + file; @@ -101,7 +92,6 @@ public class JalviewLite extends Applet embedded = true; LoadingThread loader = new LoadingThread(file, "URL", - featuresFile, applet); loader.start(); } @@ -115,7 +105,6 @@ public class JalviewLite extends Applet { LoadingThread loader = new LoadingThread(file, "URL", - featuresFile, applet); loader.start(); } @@ -243,18 +232,15 @@ public class JalviewLite extends Applet String file; String protocol; String format; - String featuresFile; JalviewLite applet; public LoadingThread(String file, String protocol, - String features, JalviewLite applet) { this.file = file; this.protocol = protocol; format = jalview.io.IdentifyFile.Identify(file, "URL"); - featuresFile = features; this.applet = applet; } @@ -272,12 +258,13 @@ public class JalviewLite extends Applet currentAlignFrame.statusBar.setText("Successfully loaded file " + file); - if (featuresFile != null) - currentAlignFrame.parseFeaturesFile(featuresFile); String treeFile = applet.getParameter("treeFile"); if (treeFile != null) { + if (treeFile.indexOf("://") == -1) + treeFile = getCodeBase() + treeFile; + try { jalview.io.NewickFile fin = new jalview.io.NewickFile(applet. @@ -300,6 +287,28 @@ public class JalviewLite extends Applet } } + String param = getParameter("features"); + if (param != null) + { + if (param.indexOf("://") == -1) + param = getCodeBase() + param; + + currentAlignFrame.parseFeaturesFile(param); + } + + param = getParameter("annotations"); + if (param != null) + { + if (param.indexOf("://") == -1) + param = getCodeBase() + param; + + new AnnotationReader().readAnnotationFile( + currentAlignFrame.viewport.getAlignment(), + param); + + currentAlignFrame.alignPanel.fontChanged(); + } + String pdbfile = applet.getParameter("PDBFILE"); if(pdbfile!=null)