int height = 0;\r
AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation();\r
\r
- for (int i = 0; i < aa.length; i++)\r
+ if(aa!=null)\r
{\r
- if (!aa[i].visible)\r
+ for (int i = 0; i < aa.length; i++)\r
{\r
- continue;\r
- }\r
+ if (!aa[i].visible)\r
+ {\r
+ continue;\r
+ }\r
\r
- height += aa[i].height;\r
+ height += aa[i].height;\r
\r
- if (y < height)\r
- {\r
- selectedRow = i;\r
+ if (y < height)\r
+ {\r
+ selectedRow = i;\r
\r
- break;\r
+ break;\r
+ }\r
}\r
}\r
}\r
\r
ap.av.alignment.addAnnotation(newAnnotation);\r
ap.av.alignment.setAnnotationIndex(newAnnotation, 0);\r
- dif = aa[aa.length - 1].height;\r
+ if (aa != null)\r
+ dif = aa[aa.length - 1].height;\r
}\r
else if (evt.getActionCommand().equals(HIDE))\r
{\r
{\r
g.drawImage(image, 2, 0 - scrollOffset, this);\r
}\r
- else if (dragEvent != null)\r
+ else if (dragEvent != null && aa!=null)\r
{\r
g.setColor(Color.lightGray);\r
g.drawString(aa[selectedRow].label, dragEvent.getX(), dragEvent.getY() - scrollOffset);\r