added the jnetfile parameter to specify a JNet concise file to be
[jalview.git] / src / jalview / bin / JalviewLite.java
index 199a843..cd0b835 100755 (executable)
@@ -28,7 +28,6 @@ import java.applet.*;
 \r
 import java.awt.*;\r
 import java.awt.event.*;\r
-import jalview.appletgui.TreePanel;\r
 \r
 \r
 /**\r
@@ -290,6 +289,7 @@ public class JalviewLite extends Applet
                                                  file,\r
                                                  embedded);\r
 \r
+\r
               initialAlignFrame = currentAlignFrame;\r
 \r
               currentAlignFrame.statusBar.setText("Successfully loaded file " + file);\r
@@ -343,6 +343,33 @@ public class JalviewLite extends Applet
                    param);\r
 \r
                currentAlignFrame.alignPanel.fontChanged();\r
+               currentAlignFrame.alignPanel.setScrollValues(0,0);\r
+\r
+             }\r
+\r
+             param = getParameter("jnetfile");\r
+             if (param != null)\r
+             {\r
+               try\r
+               {\r
+                 if (inArchive(param))\r
+                   protocol = AppletFormatAdapter.CLASSLOADER;\r
+                 else\r
+                 {\r
+                   protocol = AppletFormatAdapter.URL;\r
+                   param = addProtocol(param);\r
+                 }\r
+\r
+                 jalview.io.JPredFile predictions = new jalview.io.JPredFile(\r
+                     param, protocol);\r
+                 new JnetAnnotationMaker().add_annotation(predictions,\r
+                     currentAlignFrame.viewport.getAlignment(),\r
+                     0,false); // do not add sequence profile from concise output\r
+                 currentAlignFrame.alignPanel.fontChanged();\r
+                 currentAlignFrame.alignPanel.setScrollValues(0, 0);\r
+               } catch (Exception ex) {\r
+                 ex.printStackTrace();\r
+               }\r
              }\r
 \r
 \r