Transparency available again
[jalview.git] / src / jalview / schemes / UserColourScheme.java
index 95e9a32..3349283 100755 (executable)
@@ -134,7 +134,7 @@ public class UserColourScheme
   {\r
     StringTokenizer st = new StringTokenizer(paramValue, ";");\r
     StringTokenizer st2;\r
-    String token=null, colour, residues, residue;\r
+    String token=null, colour, residues;\r
     try{\r
       while (st.hasMoreElements())\r
       {\r
@@ -146,6 +146,12 @@ public class UserColourScheme
         while (st2.hasMoreTokens())\r
         {\r
           token = st2.nextToken();\r
+\r
+          if (ResidueProperties.aaIndex[token.charAt(0)]==-1)\r
+            continue;\r
+\r
+          int colIndex = ResidueProperties.aaIndex[token.charAt(0)];\r
+\r
           if(token.equalsIgnoreCase("lowerCase"))\r
           {\r
             if (lowerCaseColours == null)\r
@@ -157,10 +163,6 @@ public class UserColourScheme
               continue;\r
           }\r
 \r
-          int colIndex =\r
-              ( (Integer) ResidueProperties.aaHash.\r
-               get(token)).intValue();\r
-\r
           if(token.equals(token.toLowerCase()))\r
           {\r
             if(lowerCaseColours==null)\r
@@ -186,7 +188,7 @@ public class UserColourScheme
 \r
   public Color findColour(String s, int j)\r
   {\r
-      int index = ((Integer) (ResidueProperties.aaHash.get(s))).intValue();\r
+      int index = ResidueProperties.aaIndex[s.charAt(0)];\r
 \r
       if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))\r
       {\r