Sequences can be added as parameter
authoramwaterhouse <Andrew Waterhouse>
Tue, 15 Aug 2006 12:36:11 +0000 (12:36 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 15 Aug 2006 12:36:11 +0000 (12:36 +0000)
src/jalview/bin/JalviewLite.java

index 10efeeb..f1464b6 100755 (executable)
@@ -88,6 +88,20 @@ public class JalviewLite extends Applet
 \r
         file = getParameter("file");\r
 \r
+        if(file==null)\r
+        {\r
+          //Maybe the sequences are added as parameters\r
+          StringBuffer data = new StringBuffer("PASTE");\r
+          int i=1;\r
+          while( (file=getParameter("sequence"+i))!=null)\r
+          {\r
+            data.append(file.toString()+"\n");\r
+            i++;\r
+          }\r
+          if(data.length()>5)\r
+            file = data.toString();\r
+        }\r
+\r
         final JalviewLite applet = this;\r
         if(getParameter("embedded")!=null\r
            && getParameter("embedded").equalsIgnoreCase("true"))\r
@@ -261,7 +275,11 @@ public class JalviewLite extends Applet
                              JalviewLite _applet)\r
         {\r
             file = _file;\r
-            if(inArchive(file))\r
+            if(file.startsWith("PASTE"))\r
+            {\r
+              protocol = AppletFormatAdapter.PASTE;\r
+            }\r
+            else if(inArchive(file))\r
               protocol = AppletFormatAdapter.CLASSLOADER;\r
             else\r
             {\r