\r
int res = (evt.getX() / av.getCharWidth()) + av.getStartRes();\r
\r
- if ((row > -1) && (res < aa[row].annotations.length) &&\r
- (aa[row].annotations[res] != null))\r
+ if (row > -1 && res<aa[row].annotations.length)\r
{\r
-\r
-\r
if(aa[row].graphGroup>-1)\r
{\r
StringBuffer tip = new StringBuffer("<html>");\r
if (aa[gg].graphGroup == aa[row].graphGroup && aa[gg].annotations[res]!=null)\r
tip.append(aa[gg].label+" "+aa[gg].annotations[res].description+"<br>" );\r
}\r
- tip.setLength(tip.length()-4);\r
- this.setToolTipText(tip.toString()+"</html>");\r
+ if(tip.length()!=6)\r
+ {\r
+ tip.setLength(tip.length() - 4);\r
+ this.setToolTipText(tip.toString() + "</html>");\r
+ }\r
}\r
- else\r
+ else if(aa[row].annotations[res] != null)\r
this.setToolTipText(aa[row].annotations[res].description);\r
\r
- StringBuffer text = new StringBuffer("Sequence position " +\r
- (res + 1) + " " + aa[row].annotations[res].description);\r
- ap.alignFrame.statusBar.setText(text.toString());\r
+ if(aa[row].annotations[res]!=null)\r
+ {\r
+ StringBuffer text = new StringBuffer("Sequence position " +\r
+ (res + 1) + " " +\r
+ aa[row].annotations[res].description);\r
+\r
+ ap.alignFrame.statusBar.setText(text.toString());\r
+ }\r
}\r
}\r
\r
}\r
\r
\r
+\r
if (row.graph>0)\r
{\r
if(row.graphGroup>-1 && graphGroupDrawn[ row.graphGroup ] )\r
case 'E':\r
g.setColor(SHEET_COLOUR);\r
\r
- if (row.annotations[endRes].secondaryStructure != 'E')\r
+ if (row.annotations.length > endRes\r
+ && row.annotations[endRes].secondaryStructure != 'E')\r
{\r
g.fillRect(lastSSX[i], y + 4 + iconOffset,\r
x - lastSSX[i] - 4, 7);\r
\r
for (int j = sRes; j < eRes; j++)\r
{\r
+\r
if (aa.annotations[j] == null)\r
{\r
x += av.charWidth;\r