int curWidth = width;\r
\r
Color tempColour = null;\r
- while (i <= end && i < length)\r
+ while (i <= end)\r
{\r
- if (inCurrentSequenceGroup(i))\r
+ resBoxColour = Color.white;\r
+ if(i < length)\r
{\r
- if (currentSequenceGroup.getDisplayBoxes())\r
+ if (inCurrentSequenceGroup(i))\r
{\r
- getBoxColour(currentSequenceGroup.cs, seq, i);\r
+ if (currentSequenceGroup.getDisplayBoxes())\r
+ {\r
+ getBoxColour(currentSequenceGroup.cs, seq, i);\r
+ }\r
}\r
- else\r
+ else if (av.getShowBoxes())\r
{\r
- resBoxColour = Color.white;\r
+ getBoxColour(av.getGlobalColourScheme(), seq, i);\r
}\r
}\r
- else if (av.getShowBoxes())\r
- {\r
- getBoxColour(av.getGlobalColourScheme(), seq, i);\r
- }\r
- else\r
- {\r
- resBoxColour = Color.white;\r
- }\r
+\r
\r
if (resBoxColour != tempColour)\r
{\r
{\r
int pady = height / 5;\r
int charOffset = 0;\r
- char s;\r
+ char s=' ';\r
// Need to find the sequence position here.\r
\r
String sequence = seq.getSequence();\r
+\r
+ if(end+1>=seq.getLength())\r
+ end = seq.getLength()-1;\r
+\r
for (int i = start; i <= end; i++)\r
{\r
graphics.setColor(Color.black);\r
- if (i < sequence.length())\r
- {\r
- s = sequence.charAt(i);\r
- }\r
- else\r
- {\r
- s = ' ';\r
- }\r
+\r
+ s = sequence.charAt(i);\r
\r
if (!renderGaps && jalview.util.Comparison.isGap(s))\r
{\r
\r
Color tempColour = null;\r
\r
- while ((i <= end) && (i < length))\r
+ while (i <= end)\r
{\r
+ resBoxColour = Color.white;\r
+\r
+ if (i < length)\r
+ {\r
if (inCurrentSequenceGroup(i))\r
{\r
- if (currentSequenceGroup.getDisplayBoxes())\r
- {\r
- getBoxColour(currentSequenceGroup.cs, seq, i);\r
- }\r
- else\r
- {\r
- resBoxColour = Color.white;\r
- }\r
+ if (currentSequenceGroup.getDisplayBoxes())\r
+ {\r
+ getBoxColour(currentSequenceGroup.cs, seq, i);\r
+ }\r
}\r
else if (av.getShowBoxes())\r
{\r
- getBoxColour(av.getGlobalColourScheme(), seq, i);\r
- }\r
- else\r
- {\r
- resBoxColour = Color.white;\r
+ getBoxColour(av.getGlobalColourScheme(), seq, i);\r
}\r
\r
+ }\r
+\r
if (resBoxColour != tempColour)\r
{\r
if (tempColour != null)\r
// Need to find the sequence position here.\r
String sequence = seq.getSequence();\r
\r
+ if(end+1>=seq.getLength())\r
+ end = seq.getLength()-1;\r
+\r
for (int i = start; i <= end; i++)\r
{\r
graphics.setColor(Color.black);\r
\r
- if (i < sequence.length())\r
- {\r
- s = sequence.charAt(i);\r
- }\r
- else\r
- {\r
- s = ' ';\r
- }\r
+ s = sequence.charAt(i);\r
\r
if (!renderGaps && jalview.util.Comparison.isGap(s))\r
{\r