anot[index].displayCharacter = label;
}
}
- aa[activeRow].validateRangeAndDisplay();
-
- adjustPanelHeight();
+ av.getAlignment().validateAnnotation(aa[activeRow]);
ap.alignmentChanged();
+
+ adjustPanelHeight();
repaint();
return;
@Override
public void mouseClicked(MouseEvent evt)
{
- if (activeRow != -1)
- {
- AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
- AlignmentAnnotation anot = aa[activeRow];
-
- if (anot.description.equals("secondary structure"))
- {
- // System.out.println(anot.description+" "+anot.getRNAStruc());
- }
- }
+// if (activeRow != -1)
+// {
+// AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
+// AlignmentAnnotation anot = aa[activeRow];
+// }
}
// TODO mouseClicked-content and drawCursor are quite experimental!
imageFresh = false;
g.drawImage(image, 0, 0, this);
}
-
+ /**
+ * set true to enable redraw timing debug output on stderr
+ */
+ private final boolean debugRedraw = false;
/**
* non-Thread safe repaint
*
*/
public void fastPaint(int horizontal)
{
-
if ((horizontal == 0) || gg == null
|| av.getAlignment().getAlignmentAnnotation() == null
|| av.getAlignment().getAlignmentAnnotation().length < 1
repaint();
return;
}
+ long stime=System.currentTimeMillis();
gg.copyArea(0, 0, imgWidth, getHeight(), -horizontal * av.charWidth, 0);
-
+ long mtime=System.currentTimeMillis();
int sr = av.startRes;
int er = av.endRes + 1;
int transX = 0;
drawComponent(gg, sr, er);
gg.translate(-transX, 0);
-
+ long dtime=System.currentTimeMillis();
fastPaint = true;
repaint();
+ long rtime=System.currentTimeMillis();
+ if (debugRedraw) {
+ System.err.println("Scroll:\t"+horizontal+"\tCopyArea:\t"+(mtime-stime)+"\tDraw component:\t"+(dtime-mtime)+"\tRepaint call:\t"+(rtime-dtime));
+ }
}