* at 0). NOTE 1: The av limits are set in setFont in this class and in the
* adjustment listener in SeqPanel when the scrollbars move.
*/
+ @Override
public void update(Graphics g)
{
paint(g);
g1.translate(-screenY * avcharWidth, 0);
screenY += blockEnd - blockStart + 1;
blockStart = hideEnd + 1;
+
+ if (screenY > (endRes - startRes))
+ {
+ // already rendered last block
+ return;
+ }
}
}
if (screenY <= (endRes - startRes))
{
+ // remaining visible region to render
blockEnd = blockStart + (endRes - startRes) - screenY;
g1.translate(screenY * avcharWidth, 0);
draw(g1, blockStart, blockEnd, startSeq, endSeq, offset);
*/
// Set this to false to force a full panel paint
+ @Override
public void paintComponent(Graphics g)
{
updateViewport();
g1.translate(-screenY * charWidth, 0);
screenY += blockEnd - blockStart + 1;
blockStart = hideEnd + 1;
+
+ if (screenY > (endRes - startRes))
+ {
+ // already rendered last block
+ return;
+ }
}
if (screenY <= (endRes - startRes))
{
+ // remaining visible region to render
blockEnd = blockStart + (endRes - startRes) - screenY;
g1.translate(screenY * charWidth, 0);
draw(g1, blockStart, blockEnd, startSeq, endSeq, offset);