X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FUserColourScheme.java;h=00f8f6f6bb1c597eb1af80cf05d222367bc12052;hb=c1e70ea0a01d2c916675aa8020970c6696d0dba5;hp=bd70c5d6c51bb6f03eba8f4f6415cc855f25b0c6;hpb=9451924e2cdf30878359420a35d669ccee881043;p=jalview.git diff --git a/src/jalview/schemes/UserColourScheme.java b/src/jalview/schemes/UserColourScheme.java index bd70c5d..00f8f6f 100755 --- a/src/jalview/schemes/UserColourScheme.java +++ b/src/jalview/schemes/UserColourScheme.java @@ -147,14 +147,10 @@ public class UserColourScheme { token = st2.nextToken(); - if (ResidueProperties.aaHash.get(token) == null) + if (ResidueProperties.aaIndex[token.charAt(0)]==-1) continue; - int colIndex = - ( (Integer) ResidueProperties.aaHash. - get(token)).intValue(); - - //AW - LOWER CASE DISABLED IN 2.1.01 bug fix release + int colIndex = ResidueProperties.aaIndex[token.charAt(0)]; if(token.equalsIgnoreCase("lowerCase")) { @@ -190,14 +186,14 @@ public class UserColourScheme - public Color findColour(String s, int j) + public Color findColour(char c, int j) { - int index = ((Integer) (ResidueProperties.aaHash.get(s))).intValue(); + Color currentColour; + int index = ResidueProperties.aaIndex[c]; - if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j)) + if ((threshold == 0) || aboveThreshold(c, j)) { - //AW - LOWER CASE DISABLED IN 2.1.01 bug fix release - if(lowerCaseColours!=null && 'a' <= s.charAt(0) && s.charAt(0) <= 'z') + if(lowerCaseColours!=null && 'a' <= c && c <= 'z') currentColour = lowerCaseColours[index]; else currentColour = colors[index]; @@ -208,7 +204,7 @@ public class UserColourScheme } if(conservationColouring) - applyConservation(j); + currentColour = applyConservation(currentColour, j); return currentColour;