this.av = av;\r
}\r
\r
- public Color findColour(SequenceI seq, String s, int j, Vector aa)\r
+ public Color findColour(String s, int j, Vector aa)\r
{\r
- if (!s.equals("-") && !s.equals(".") && !s.equals(" "))\r
+\r
+ if (!jalview.util.Comparison.isGap((s.charAt(0))))\r
{\r
String max = av.getVisibleConsensus().charAt(j) + "";\r
\r
this.max = max;\r
}\r
\r
- /* public Color getColour(SequenceI seq, int j, Vector aa) {\r
- Color c = Color.white;\r
- String s = seq.getSequence(j,j+1);\r
+\r
+ public Color findColour(String s,int j,Vector aa)\r
+ {\r
\r
if (threshold > 0)\r
{\r
- if (aboveThreshold(aa,seq,j,threshold))\r
- c = findColour(seq,s,j,aa);\r
+ if (!aboveThreshold(aa,s,j))\r
+ return Color.white;\r
}\r
- else if ( !s.equals("-") && !s.equals(".") && !s.equals(" ") )\r
- c = findColour(seq,s,j,aa);\r
- // else\r
- // c = Color.white;\r
-\r
- return c;\r
- }*/\r
-\r
- public Color findColour(SequenceI seq,String s,int j,Vector aa)\r
- {\r
\r
float red = (float)(scores[((Integer)ResidueProperties.aaHash.get(s)).intValue()]\r
- (float)min)/(float)(max - min);\r
- if (red > (float)1.0)\r
- red = (float)1.0;\r
+ if (red > 1.0f)\r
+ red = 1.0f;\r
+\r
+ if (red < 0.0f)\r
+ red = 0.0f;\r
\r
- if (red < (float)0.0)\r
- red = (float)0.0;\r
+ char c = s.charAt(0);\r
\r
- if(s.equals(" ")|| s.equals(".") || s.equals("-"))\r
+ if(jalview.util.Comparison.isGap((c)))\r
return Color.white;\r
\r
// This isn';t great - pool of colours in here?\r