Applet doesnt have hidden columns
[jalview.git] / src / jalview / appletgui / AlignViewport.java
index 481a657..1bc1b51 100755 (executable)
@@ -56,7 +56,7 @@ public class AlignViewport
   boolean conservationColourSelected = false;\r
   boolean abovePIDThreshold = false;\r
 \r
-  SequenceGroup selectionGroup = new SequenceGroup();\r
+  SequenceGroup selectionGroup;\r
 \r
   int charHeight;\r
   int charWidth;\r
@@ -79,7 +79,7 @@ public class AlignViewport
 \r
   // The following vector holds the features which are\r
  // currently visible, in the correct order or rendering\r
-  Hashtable featuresDisplayed = null;\r
+  Hashtable featuresDisplayed;\r
 \r
 \r
   public Vector vconsensus;\r
@@ -141,14 +141,34 @@ public class AlignViewport
     updateConservation();\r
     updateConsensus();\r
 \r
-    if (applet != null && applet.getParameter("defaultColour") != null)\r
+\r
+    if (applet != null)\r
     {\r
-      globalColourScheme = ColourSchemeProperty.getColour(alignment,\r
-          applet.getParameter("defaultColour"));\r
-      if (globalColourScheme != null)\r
+      String colour = applet.getParameter("defaultColour");\r
+\r
+      if(colour == null)\r
+      {\r
+        colour = applet.getParameter("userDefinedColour");\r
+        if(colour !=null)\r
+          colour = "User Defined";\r
+      }\r
+\r
+      if(colour != null)\r
+      {\r
+        globalColourScheme = ColourSchemeProperty.getColour(alignment, colour);\r
+        if (globalColourScheme != null)\r
+        {\r
+          globalColourScheme.setConsensus(vconsensus);\r
+        }\r
+      }\r
+\r
+      if(applet.getParameter("userDefinedColour")!=null)\r
       {\r
-        globalColourScheme.setConsensus(vconsensus);\r
+        ((UserColourScheme)globalColourScheme).parseAppletParameter(\r
+            applet.getParameter("userDefinedColour"));\r
       }\r
+\r
+\r
     }\r
   }\r
 \r