*/\r
public Color findColour(String n, int j)\r
{\r
- currentColour = Color.white;\r
+ Color currentColour = Color.white;\r
\r
if ((threshold == 0) || aboveThreshold(n, j))\r
{\r
}\r
\r
if(conservationColouring)\r
- applyConservation(j);\r
+ applyConservation(currentColour, j);\r
\r
return currentColour;\r
}\r
\r
public Color findColour(String s, int j)\r
{\r
+\r
char res = s.charAt(0);\r
if ('a' <= res && res <= 'z' )\r
{\r
return Color.white;\r
}\r
\r
+ Color currentColour;\r
+\r
if (!jalview.util.Comparison.isGap( res ))\r
{\r
String max = (String) consensus[j].get(AAFrequency.MAXRESIDUE);\r
}\r
\r
if(conservationColouring)\r
- applyConservation(j);\r
+ applyConservation(currentColour, j);\r
}\r
else\r
{\r
\r
public Color findColour(String s, int j)\r
{\r
-\r
- if(cons2.length<=j)\r
- return currentColour;\r
+ Color currentColour;\r
\r
\r
- if ( (threshold != 0) && !aboveThreshold(s, j))\r
+ if ( cons2.length<=j || (threshold != 0 && !aboveThreshold(s, j)))\r
{\r
return Color.white;\r
}\r
}\r
\r
if(conservationColouring)\r
- applyConservation(j);\r
+ applyConservation(currentColour, j);\r
\r
return currentColour;\r
}\r
*/\r
public Color findColour(String n, int j)\r
{\r
+ Color currentColour;\r
if ((threshold == 0) || aboveThreshold(n, j))\r
{\r
try\r
}\r
\r
if(conservationColouring)\r
- applyConservation(j);\r
+ applyConservation(currentColour, j);\r
\r
return currentColour;\r
}\r
return Color.white;\r
}\r
\r
- currentColour = Color.white;\r
+ Color currentColour = Color.white;\r
\r
double sc = 0;\r
\r
}\r
\r
if(conservationColouring)\r
- applyConservation(j);\r
+ applyConservation(currentColour, j);\r
\r
return currentColour;\r
}\r
/** DOCUMENT ME!! */\r
int inc = 30;\r
\r
- /**\r
- * The colour to be calculated, manipulated and returned\r
- */\r
- Color currentColour = null;\r
-\r
-\r
\r
/**\r
* Creates a new ResidueColourScheme object.\r
\r
public Color findColour(String s, int j)\r
{\r
-\r
+ Color currentColour;\r
int index = ResidueProperties.aaIndex[s.charAt(0)];\r
\r
if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))\r
}\r
\r
if(conservationColouring)\r
- applyConservation(j);\r
+ applyConservation(currentColour, j);\r
\r
\r
return currentColour;\r
* @return DOCUMENT ME!\r
*/\r
\r
- void applyConservation(int i)\r
+ void applyConservation(Color currentColour, int i)\r
{\r
\r
if ((conservation[i] != '*') && (conservation[i] != '+'))\r
return Color.white;\r
}\r
\r
- currentColour = colors[ ResidueProperties.aaIndex[c] ];\r
+ Color currentColour = colors[ ResidueProperties.aaIndex[c] ];\r
\r
if(conservationColouring)\r
- applyConservation(j);\r
+ applyConservation(currentColour, j);\r
\r
return currentColour;\r
}\r
\r
public Color findColour(String s, int j)\r
{\r
+ Color currentColour;\r
int index = ResidueProperties.aaIndex[s.charAt(0)];\r
\r
if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))\r
}\r
\r
if(conservationColouring)\r
- applyConservation(j);\r
+ applyConservation(currentColour, j);\r
\r
\r
return currentColour;\r