From: amwaterhouse Date: Mon, 18 Apr 2005 08:04:44 +0000 (+0000) Subject: fastPaint modified incase scroll is more than page size X-Git-Tag: Release_2_0~394 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1d1a30610226ffdb296e6ceb986b3fe0298f2158;p=jalview.git fastPaint modified incase scroll is more than page size --- diff --git a/src/jalview/gui/IdCanvas.java b/src/jalview/gui/IdCanvas.java index f1ab981..6c50f31 100755 --- a/src/jalview/gui/IdCanvas.java +++ b/src/jalview/gui/IdCanvas.java @@ -56,16 +56,23 @@ public class IdCanvas extends JPanel gg.copyArea( 0,0, getWidth(), imgHeight, 0, -vertical*av.charHeight ); int ss=av.startSeq, es=av.endSeq, transY = 0; - if(vertical>0) // scroll down + if (vertical > 0) // scroll down { - transY = imgHeight - vertical*av.charHeight; ss = es - vertical; + if(ss av.endSeq) + es = av.endSeq; } + + gg.translate(0, transY); drawIds(ss, es); @@ -84,8 +91,8 @@ public class IdCanvas extends JPanel if (fastPaint) { - g.drawImage(image, 0, 0, this); fastPaint = false; + g.drawImage(image, 0, 0, this); return; } @@ -109,11 +116,9 @@ public class IdCanvas extends JPanel void drawIds(int starty, int endy) { - Color currentColor = Color.white; Color currentTextColor = Color.black; - if (av.getWrapAlignment()) {