private int availHeight;
+ private boolean allowFastPaint;
+
// Don't do this! Graphics handles are supposed to be transient
// private Graphics2D gg;
// Call repaint on alignment panel so that repaints from other alignment
// panel components can be aggregated. Otherwise performance of the
// overview window and others may be adversely affected.
- // System.out.println("SeqCanvas fastPaint() repaint() request...");
av.getAlignPanel().repaint();
} finally
{
{
return;
}
-
ViewportRanges ranges = av.getRanges();
int startRes = ranges.getStartRes();
int startSeq = ranges.getStartSeq();
// }
Rectangle vis, clip;
- if (img != null
- && (fastPaint
- || (vis = getVisibleRect()).width != (clip = g
- .getClipBounds()).width
- || vis.height != clip.height))
+ if (allowFastPaint && img != null
+ && (fastPaint || (vis = getVisibleRect()).width != (clip = g.getClipBounds()).width
+ || vis.height != clip.height))
{
g.drawImage(img, 0, 0, this);
drawSelectionGroup((Graphics2D) g, startRes, endRes, startSeq,
}
else
{
+ allowFastPaint = true;
// img is a cached version of the last view we drew.
// If we have no img or the size has changed, make a new one.
//
- ((int[]) evt.getOldValue())[0];
scrollY = ((int[]) evt.getNewValue())[1]
- ((int[]) evt.getOldValue())[1];
-
- // System.out.println("SC dx dy " + scrollX + " " + scrollY);
-
if (scrollX != 0 && scrollY != 0)
{
// all sorts of problems in JavaScript if this is commented out.
*/
public void setNoFastPaint()
{
- fastPaint = false;
+ allowFastPaint = false;
}
}