\r
public static int GRAPH_HEIGHT = 40;\r
\r
+ boolean MAC = false;\r
+\r
public AnnotationPanel(AlignmentPanel ap)\r
{\r
+ if (System.getProperty("os.name").startsWith("Mac"))\r
+ MAC = true;\r
+\r
this.ap = ap;\r
av = ap.av;\r
this.setLayout(null);\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 - lastSSX, 7, 8, 8);\r
+ break;\r
+ }\r
+\r
int sCol = (lastSSX / av.charWidth) + startRes;\r
int x1 = lastSSX;\r
int x2 = x;\r
\r
- if(row.annotations[sCol-1]==null ||\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
{\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 - lastSSX, 7, 8, 8);\r
+ break;\r
+ }\r
+\r
\r
int sCol = (lastSSX / av.charWidth) + startRes;\r
int x1 = lastSSX;\r
int x2 = x;\r
\r
- if(row.annotations[sCol-1]==null ||\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
return;\r
\r
\r
- eRes = Math.min(eRes, aa.annotations.length);\r
\r
int x = 0;\r
\r
if(eRes<av.endRes)\r
eRes++;\r
\r
+ eRes = Math.min(eRes, aa.annotations.length);\r
+\r
+\r
if(sRes==0)\r
{\r
sRes++;\r