X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FResidueColourScheme.java;h=df905006fe4f1fe03ac5112a1b15e13799258a84;hb=f78ed026becc8e143d5b5953fce6c0961428d2a7;hp=b905c452ba87dcce2683ded2f74c2ec0fdc5cd36;hpb=d640a8ce605b836b2e6eb1771994d3baef5c31a0;p=jalview.git diff --git a/src/jalview/schemes/ResidueColourScheme.java b/src/jalview/schemes/ResidueColourScheme.java index b905c45..df90500 100755 --- a/src/jalview/schemes/ResidueColourScheme.java +++ b/src/jalview/schemes/ResidueColourScheme.java @@ -75,21 +75,20 @@ public class ResidueColourScheme implements ColourSchemeI /** * Find a colour without an index in a sequence */ - public Color findColour(String aa) + public Color findColour(char c) { - return colors[ResidueProperties.aaIndex[aa.charAt(0)]]; + return colors[ResidueProperties.aaIndex[c]]; } - public Color findColour(String s, int j) + public Color findColour(char c, int j) { Color currentColour; - int index = ResidueProperties.aaIndex[s.charAt(0)]; - if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j)) + if ((threshold == 0) || aboveThreshold(c, j)) { - currentColour = colors[index]; + currentColour = colors[ResidueProperties.aaIndex[c]]; } else { @@ -136,22 +135,20 @@ public class ResidueColourScheme implements ColourSchemeI * * @return DOCUMENT ME! */ - public boolean aboveThreshold(String s, int j) + public boolean aboveThreshold(char c, int j) { - char c = s.charAt(0); if ('a' <= c && c <= 'z') { // TO UPPERCASE !!! //Faster than toUpperCase c -= ('a' - 'A'); - s = String.valueOf(c); } if (consensus == null || consensus[j] == null) return false; if ( ( ( (Integer) consensus[j].get(AAFrequency.MAXCOUNT)).intValue() != -1) && - consensus[j].contains(s)) + consensus[j].contains(String.valueOf(c))) { if ( ( (Float) consensus[j].get(ignoreGaps)).floatValue() >= threshold) {