JAL-2197 add jpredfile as alternative form of jnetfile parameter on applet
authorJim Procter <jprocter@issues.jalview.org>
Mon, 24 Oct 2016 13:45:51 +0000 (14:45 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 24 Oct 2016 13:45:51 +0000 (14:45 +0100)
examples/appletDeployment.html
examples/appletParameters.html
src/jalview/appletgui/AlignFrame.java
src/jalview/bin/JalviewLite.java

index 7fcca00..9438fa4 100644 (file)
        <tr>
                <td><strong>2.1</strong></td>
                <td><ul>
-          <li>Jalview Applet can read and display JNet secondary structure annotation 
+          <li>Jalview Applet can read and display JPred secondary structure annotation 
             directly via the <strong>jnetfile</strong> parameter. <br>
           </li>
           <li>Param &quot;UserDefinedColour&quot; - specify your own colours for each residue using a semi colon 
index cc95ecb..277fd69 100644 (file)
@@ -91,8 +91,9 @@ the applet can be interacted with <em>via</em> its
             <td>jnetfile</td>
             <td>fileName</td>
             <td>Secondary structure predictions from a <a
-            href="http://www.compbio.dundee.ac.uk/~www-jpred/">Jnet</a> Concise 
-              file will be added to the first sequence in the alignment.</td>
+            href="http://www.compbio.dundee.ac.uk/~www-jpred/">JPred</a> Concise 
+              file will be added to the first sequence in the alignment.<br/>
+              <em>jpredfile</em> can be used interchangeably with this parameter.</td>
           </tr>
           <tr> 
             <td>PDBfile(x)</td>
index 122afa8..af91399 100644 (file)
@@ -1478,10 +1478,13 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
       url.append(appendProtocol(viewport.applet.getParameter("annotations")));
     }
 
-    if (viewport.applet.getParameter("jnetfile") != null)
+    if (viewport.applet.getParameter("jnetfile") != null
+            || viewport.applet.getParameter("jpredfile") != null)
     {
       url.append("&annotations=");
-      url.append(appendProtocol(viewport.applet.getParameter("jnetfile")));
+      url.append(appendProtocol(viewport.applet.getParameter("jnetfile") != null ? viewport.applet
+              .getParameter("jnetfile") : viewport.applet
+              .getParameter("jpredfile")));
     }
 
     if (viewport.applet.getParameter("defaultColour") != null)
index b30ad41..a3b2b0b 100644 (file)
@@ -2247,6 +2247,11 @@ public class JalviewLite extends Applet implements
     {
       boolean result = false;
       String param = applet.getParameter("jnetfile");
+      if (param == null)
+      {
+        // jnet became jpred around 2016
+        param = applet.getParameter("jpredfile");
+      }
       if (param != null)
       {
         try