\r
int x = 0;\r
int y = 0;\r
- char[] lastSS = new char[aa.length];\r
- int[] lastSSX = new int[aa.length];\r
+ char lastSS;\r
+ int lastSSX;\r
int iconOffset = av.charHeight / 2;\r
boolean validRes = false;\r
\r
continue;\r
}\r
\r
+ lastSS = ' ';\r
+ lastSSX = 0;\r
\r
\r
if (row.graph>0)\r
\r
int column = startRes;\r
int yPos = startRes;\r
- int aaMax = row.annotations.length-1;\r
\r
while (yPos < endRes)\r
{\r
if (av.hasHiddenColumns)\r
{\r
column = av.getColumnSelection().adjustForHiddenColumns(yPos);\r
- if (column > aaMax)\r
+ if (column > row.annotations.length-1)\r
{\r
break;\r
}\r
if (row.hasIcons)\r
{\r
if (!validRes ||\r
- (row.annotations[column].secondaryStructure != lastSS[i]))\r
+ (row.annotations[column].secondaryStructure != lastSS))\r
{\r
- switch (lastSS[i])\r
+ switch (lastSS)\r
{\r
case 'H':\r
g.setColor(HELIX_COLOUR);\r
- g.fillRoundRect(lastSSX[i], y + 4 + iconOffset,\r
- x - lastSSX[i], 7, 8, 8);\r
+ g.fillRoundRect(lastSSX, y + 4 + iconOffset,\r
+ x - lastSSX, 7, 8, 8);\r
\r
break;\r
\r
case 'E':\r
g.setColor(SHEET_COLOUR);\r
- g.fillRect(lastSSX[i], y + 4 + iconOffset,\r
- x - lastSSX[i] - 4, 7);\r
+ g.fillRect(lastSSX, y + 4 + iconOffset,\r
+ x - lastSSX - 4, 7);\r
g.fillPolygon(new int[] { x - 4, x - 4, x },\r
new int[]\r
{\r
\r
default:\r
g.setColor(Color.gray);\r
- g.fillRect(lastSSX[i], y + 6 + iconOffset,\r
- x - lastSSX[i], 2);\r
+ g.fillRect(lastSSX, y + 6 + iconOffset,\r
+ x - lastSSX, 2);\r
\r
break;\r
}\r
\r
if (validRes)\r
{\r
- lastSS[i] = row.annotations[column].secondaryStructure;\r
+ lastSS = row.annotations[column].secondaryStructure;\r
}\r
else\r
{\r
- lastSS[i] = ' ';\r
+ lastSS = ' ';\r
}\r
\r
- lastSSX[i] = x;\r
+ lastSSX = x;\r
}\r
}\r
\r
\r
if (row.hasIcons)\r
{\r
- switch (lastSS[i])\r
+ switch (lastSS)\r
{\r
case 'H':\r
g.setColor(HELIX_COLOUR);\r
- g.fillRoundRect(lastSSX[i], y + 4 + iconOffset,\r
- x - lastSSX[i], 7, 8, 8);\r
+ g.fillRoundRect(lastSSX, y + 4 + iconOffset,\r
+ x - lastSSX, 7, 8, 8);\r
\r
break;\r
\r
if (row.annotations[endRes] !=null\r
&& row.annotations[endRes].secondaryStructure != 'E')\r
{\r
- g.fillRect(lastSSX[i], y + 4 + iconOffset,\r
- x - lastSSX[i] - 4, 7);\r
+ g.fillRect(lastSSX, y + 4 + iconOffset,\r
+ x - lastSSX - 4, 7);\r
g.fillPolygon(new int[]\r
{x - 4, x - 4, x},\r
new int[]\r
}, 3);\r
}\r
else\r
- g.fillRect(lastSSX[i], y + 4 + iconOffset,\r
- x - lastSSX[i], 7);\r
+ g.fillRect(lastSSX, y + 4 + iconOffset,\r
+ x - lastSSX, 7);\r
\r
break;\r
\r
- case 'C':\r
- break;\r
\r
default:\r
g.setColor(Color.gray);\r
- g.fillRect(lastSSX[i], y + 6 + iconOffset, x - lastSSX[i], 2);\r
+ g.fillRect(lastSSX, y + 6 + iconOffset, x - lastSSX, 2);\r
\r
break;\r
}\r