file: is a URL
[jalview.git] / src / jalview / bin / Jalview.java
index 3e8018b..87bacc1 100755 (executable)
@@ -105,8 +105,8 @@ public class Jalview
           try\r
           {\r
             UIManager.setLookAndFeel(\r
-                   UIManager.getSystemLookAndFeelClassName()\r
-            //        UIManager.getCrossPlatformLookAndFeelClassName()\r
+                UIManager.getSystemLookAndFeelClassName()\r
+                //        UIManager.getCrossPlatformLookAndFeelClassName()\r
 //"com.sun.java.swing.plaf.gtk.GTKLookAndFeel"\r
 //"javax.swing.plaf.metal.MetalLookAndFeel"\r
 //"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"\r
@@ -150,7 +150,7 @@ public class Jalview
 \r
             protocol = "File";\r
 \r
-            if (file.indexOf("http:") > -1)\r
+            if (file.indexOf("http:") > -1 || file.indexOf("file:") >-1)\r
             {\r
               protocol = "URL";\r
             }\r
@@ -164,17 +164,39 @@ public class Jalview
 \r
             AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol, format);\r
 \r
+            data = aparser.getValue("colour");\r
+            if(data!=null)\r
+            {\r
+              data.replaceAll("%20", " ");\r
+\r
+              jalview.schemes.ColourSchemeI cs =\r
+                  jalview.schemes.ColourSchemeProperty.getColour(af.getViewport().\r
+                  getAlignment(), data);\r
+\r
+              if(cs == null)\r
+              {\r
+                jalview.schemes.UserColourScheme ucs\r
+                    = new jalview.schemes.UserColourScheme("white");\r
+                ucs.parseAppletParameter(data);\r
+                cs = ucs;\r
+              }\r
+\r
+              System.out.println("colour is " + data);\r
+              af.changeColour( cs );\r
+            }\r
+\r
+\r
             // Must maintain ability to use the groups flag\r
             data = aparser.getValue("groups");\r
             if (data != null)\r
             {\r
-              af.parseGroupsFile(data);\r
+              af.parseFeaturesFile(data, protocol);\r
               System.out.println("Added "+data);\r
             }\r
             data = aparser.getValue("features");\r
             if (data != null)\r
             {\r
-              af.parseGroupsFile(data);\r
+              af.parseFeaturesFile(data, protocol);\r
               System.out.println("Added "+data);\r
             }\r
 \r
@@ -228,9 +250,11 @@ public class Jalview
           }\r
 \r
         // We'll only open the default file if the desktop is visible.\r
+        // And the user\r
         //////////////////////\r
           if (\r
               !headless\r
+          && file==null\r
           && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true)\r
                     )\r
           {\r
@@ -252,7 +276,7 @@ public class Jalview
             else\r
             {\r
               format = new jalview.io.IdentifyFile().Identify(file, protocol);\r
-              desktop.LoadFile(file, protocol, format);\r
+              new jalview.io.FileLoader().LoadFile(file, protocol, format);\r
             }\r
           }\r
     }\r