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