\r
public void paint(Graphics g)\r
{\r
- g.setColor(Color.white);\r
- g.fillRect(0,0, getSize().width, getSize().height);\r
imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;\r
\r
if (image == null || imgWidth != image.getWidth(this))\r
g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);\r
\r
\r
- if(aa.threshold!=null)\r
- {\r
- g.setColor(aa.threshold.colour);\r
- y2 = (int)(y - ((aa.threshold.value-min) / range)*graphHeight);\r
- g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);\r
- }\r
-\r
for (int j = sRes; j < eRes; j++)\r
{\r
if(aa.annotations[j]==null || aa.annotations[j-1]==null)\r
g.drawLine(x-av.charWidth/2, y1, x+av.charWidth/2, y2);\r
x += av.charWidth;\r
}\r
+\r
+\r
+ if(aa.threshold!=null)\r
+ {\r
+ g.setColor(aa.threshold.colour);\r
+ y2 = (int)(y - ((aa.threshold.value-min) / range)*aa.graphHeight);\r
+ g.drawLine(0,y2,(eRes-sRes)*av.charWidth,y2);\r
+ }\r
+\r
}\r
\r
public void drawBarGraph(Graphics g, AlignmentAnnotation aa,\r
\r
float range = max - min;\r
\r
- if(aa.threshold!=null)\r
- {\r
- g.setColor(aa.threshold.colour);\r
- y2 = (int)(y - ((aa.threshold.value-min) / range)*aa.graphHeight);\r
- g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);\r
- }\r
-\r
y1 = y2 = y;\r
\r
if(min<0)\r
\r
g.setColor(Color.gray);\r
\r
- g.drawLine(x,y2,(eRes-sRes+1)*av.charWidth,y2);\r
+ g.drawLine(x,y2,(eRes-sRes)*av.charWidth,y2);\r
\r
for (int j = sRes; j < eRes; j++)\r
{\r
x += av.charWidth;\r
}\r
\r
+\r
+ if(aa.threshold!=null)\r
+ {\r
+ g.setColor(aa.threshold.colour);\r
+ y2 = (int)(y - ((aa.threshold.value-min) / range)*aa.graphHeight);\r
+ g.drawLine(0,y2,(eRes-sRes)*av.charWidth,y2);\r
+ }\r
+\r
+\r
}\r
\r
// used by overview window\r