\r
this.ap = ap;\r
av = ap.av;\r
- this.setLayout(null);\r
+ setLayout(null);\r
adjustPanelHeight();\r
\r
addMouseMotionListener(new MouseMotionAdapter()\r
}\r
\r
this.setSize(getSize().width, height);\r
- if(ap!=null)\r
- ap.annotationScroller.setSize(getSize().width, height);\r
-\r
\r
repaint();\r
\r
\r
public void paint(Graphics g)\r
{\r
+\r
+\r
imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;\r
\r
if (image == null || imgWidth != image.getWidth(this))\r
}\r
\r
drawComponent(gg, av.startRes, av.endRes + 1);\r
+ g.setColor(Color.white);\r
+ g.fillRect(0, 0, getSize().width, getSize().height);\r
g.drawImage(image, 0, 0, this);\r
}\r
\r
g.setColor(Color.white);\r
g.fillRect(0, 0, getSize().width, getSize().height);\r
g.setColor(Color.black);\r
- g.drawString("Alignment has no annotations", 20, 15);\r
+ if(av.validCharWidth)\r
+ g.drawString("Alignment has no annotations", 20, 15);\r
\r
return;\r
}\r
\r
AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
\r
- int j;\r
int x = 0;\r
int y = 0;\r
char lastSS;\r
x = (column - startRes) * av.charWidth;\r
\r
\r
- if (validRes &&\r
- (row.annotations[column].displayCharacter.length() > 0))\r
+ if (av.validCharWidth && validRes &&\r
+ (row.annotations[column].displayCharacter.length() > 0))\r
{\r
int charOffset = (av.charWidth -\r
fm.charWidth(row.annotations[column].displayCharacter.charAt(\r