+ yPos ++;\r
+\r
+ if(aa.annotations[column]==null || aa.annotations[column-1]==null)\r
+ {\r
+ x+=av.charWidth;\r
+ continue;\r
+ }\r
+\r
+ g.setColor(aa.annotations[column].colour);\r
+ y1 = y - (int) (((aa.annotations[column-1].value-min) / range) * graphHeight);\r
+ y2 = y - (int) (((aa.annotations[column].value-min) / range) * graphHeight);\r
+ g.drawLine(x-av.charWidth/2, y1, x+av.charWidth/2, y2);\r
+ x += av.charWidth;\r
+ }\r
+ }\r
+\r
+ public void drawBarGraph(Graphics g, AlignmentAnnotation aa,\r
+ int sRes, int eRes,\r
+ float min, float max,\r
+ int y)\r
+ {\r
+ if(sRes>aa.annotations.length)\r
+ return;\r
+\r
+ int x=0, y1, y2;\r
+\r
+ float range = max - min;\r
+\r
+ if(aa.threshold!=null)\r
+ {\r
+ g.setColor(aa.threshold.colour);\r
+ Graphics2D g2 = (Graphics2D)g;\r
+ g2.setStroke(new BasicStroke(1,\r
+ BasicStroke.CAP_SQUARE,\r
+ BasicStroke.JOIN_ROUND, 3f,\r
+ new float[] { 5f, 3f }, 0f));\r
+\r
+ y2 = (int)(y - ((aa.threshold.value-min) / range)*aa.graphHeight);\r
+ g.drawLine(x-av.charWidth,y2,(eRes-sRes+1)*av.charWidth,y2);\r
+ g2.setStroke(new BasicStroke());\r
+ }\r
+\r
+ y1 = y2 = y;\r
+\r
+ if(min<0)\r
+ y2 = (int)(y - (0-min / (range))*aa.graphHeight);\r
+\r
+ g.setColor(Color.gray);\r
+\r
+ g.drawLine(x,y2,(eRes-sRes+1)*av.charWidth,y2);\r
+\r
+\r
+ int column = sRes;\r
+ int yPos = sRes;\r
+ int aaMax = aa.annotations.length-1;\r
+\r
+ while( yPos < eRes )\r
+ {\r
+ if(av.hasHiddenColumns)\r
+ {\r
+ column = av.getColumnSelection().adjustForHiddenColumns(yPos);\r
+ if(column > aaMax)\r
+ {\r
+ break;\r
+ }\r