\r
int res = evt.getX() / av.getCharWidth() + av.getStartRes();\r
if(row>-1 && res<aa[row].annotations.length && aa[row].annotations[res]!=null)\r
+ {\r
this.setToolTipText(aa[row].annotations[res].description);\r
+ StringBuffer text = new StringBuffer("Sequence position " + (res + 1) +\r
+ " " +\r
+ aa[row].annotations[res].description);\r
+ ap.alignFrame.statusBar.setText(text.toString());\r
+ }\r
+\r
\r
}\r
public void mouseClicked(MouseEvent evt) {}\r
return;\r
}\r
\r
- imgWidth = (av.endRes-av.startRes) *av.charWidth;\r
+ imgWidth = (av.endRes-av.startRes+1) *av.charWidth;\r
\r
image = new BufferedImage(imgWidth,\r
ap.annotationPanel.getHeight(),\r
BufferedImage.TYPE_INT_RGB);\r
gg = (Graphics2D) image.getGraphics();\r
- gg.setColor(Color.white);\r
- gg.fillRect(0, 0, imgWidth, getHeight());\r
gg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r
RenderingHints.VALUE_ANTIALIAS_ON);\r
- fm = gg.getFontMetrics();\r
- gg.setFont(av.getFont());\r
\r
+ gg.setFont(av.getFont());\r
+ fm = gg.getFontMetrics();\r
\r
- drawComponent( gg, av.startRes, av.endRes);\r
+ drawComponent( gg, av.startRes, av.endRes+1);\r
g.drawImage( image, 0, 0, this);\r
+\r
}\r
\r
public void fastPaint(int horizontal)\r
{\r
- if( horizontal ==0\r
+ if( horizontal == 0\r
|| av.alignment.getAlignmentAnnotation()==null\r
|| av.alignment.getAlignmentAnnotation().length<1\r
)\r
}\r
\r
gg.copyArea( 0,0, imgWidth, getHeight(), -horizontal*av.charWidth, 0 );\r
- int sr=av.startRes, er=av.endRes, transX=0;\r
+ int sr=av.startRes, er=av.endRes+1, transX=0;\r
\r
if(horizontal>0) // scrollbar pulled right, image to the left\r
{\r
int iconOffset = av.charHeight/2;\r
boolean validRes = false;\r
//\u03B2 \u03B1\r
+\r
for(int i=0; i<aa.length; i++)\r
{\r
AlignmentAnnotation row = aa[i];\r
\r
if(validRes && row.annotations[j].displayCharacter.length()>0)\r
{\r
- int charOffset = (av.charWidth -\r
- fm.charWidth(row.annotations[j].displayCharacter.\r
- charAt(0))) / 2;\r
+ int charOffset = (av.charWidth - fm.charWidth(row.annotations[j].displayCharacter.charAt(0)))/2;\r
g.setColor( row.annotations[j].colour);\r
if(j==0)\r
{\r