+ if (row.hasIcons)\r
+ {\r
+ switch (lastSS)\r
+ {\r
+ case 'H':\r
+ g.setColor(HELIX_COLOUR);\r
+ if (MAC)\r
+ {\r
+ //Off by 1 offset when drawing rects and ovals\r
+ //to offscreen image on the MAC\r
+ g.fillRoundRect(lastSSX, y + 4 + iconOffset,\r
+ (x * av.charWidth) - lastSSX, 7, 8, 8);\r
+ break;\r
+ }\r
+\r
+ int sCol = (lastSSX / av.charWidth) + startRes;\r
+ int x1 = lastSSX;\r
+ int x2 = (x * av.charWidth);\r
+\r
+ if (sCol == 0 ||\r
+ row.annotations[sCol - 1] == null ||\r
+ row.annotations[sCol - 1].secondaryStructure != 'H')\r
+ {\r
+ g.fillArc(lastSSX, y + 4 + iconOffset, av.charWidth, 8, 90, 180);\r
+ x1 += av.charWidth / 2;\r
+ }\r
+\r
+ if (row.annotations[column] == null ||\r
+ row.annotations[column].secondaryStructure != 'H')\r
+ {\r
+ g.fillArc( (x * av.charWidth) - av.charWidth,\r
+ y + 4 + iconOffset, av.charWidth, 8, 270,\r
+ 180);\r
+ x2 -= av.charWidth / 2;\r
+ }\r
+\r
+ g.fillRect(x1, y + 4 + iconOffset, x2 - x1, 8);\r
+\r
+ break;\r
+\r
+ case 'E':\r
+ g.setColor(SHEET_COLOUR);\r
+\r
+ if (row.annotations[endRes] == null\r
+ || row.annotations[endRes].secondaryStructure != 'E')\r
+ {\r
+ g.fillRect(lastSSX, y + 4 + iconOffset,\r
+ (x * av.charWidth) - lastSSX - 4, 7);\r
+ g.fillPolygon(new int[]\r
+ { (x * av.charWidth) - 4,\r
+ (x * av.charWidth) - 4,\r
+ (x * av.charWidth)},\r
+ new int[]\r
+ {\r
+ y + iconOffset, y + 14 + iconOffset,\r
+ y + 7 + iconOffset\r
+ }, 3);\r
+ }\r
+ else\r
+ {\r
+ g.fillRect(lastSSX, y + 4 + iconOffset,\r
+ x * av.charWidth - lastSSX, 7);\r
+ }\r
+ break;\r
+\r
+ default:\r
+ g.setColor(Color.gray);\r
+ if (!av.wrapAlignment || endRes == av.endRes)\r
+ {\r
+ g.fillRect(lastSSX, y + 6 + iconOffset,\r
+ (x * av.charWidth) - lastSSX, 2);\r
+ }\r
+\r
+ break;\r
+ }\r
+ }\r