gg.copyArea( 0,0, getWidth(), imgHeight, 0, -vertical*av.charHeight );\r
\r
int ss=av.startSeq, es=av.endSeq, transY = 0;\r
- if(vertical>0) // scroll down\r
+ if (vertical > 0) // scroll down\r
{\r
- transY = imgHeight - vertical*av.charHeight;\r
ss = es - vertical;\r
+ if(ss<av.startSeq) // ie scrolling too fast, more than a page at a time\r
+ ss = av.startSeq;\r
+ else\r
+ transY = imgHeight - vertical * av.charHeight;\r
}\r
- else if(vertical<0)\r
+ else if (vertical < 0)\r
{\r
- es = ss-vertical;\r
+ es = ss - vertical;\r
+ if(es > av.endSeq)\r
+ es = av.endSeq;\r
}\r
\r
+\r
+\r
gg.translate(0, transY);\r
\r
drawIds(ss, es);\r
\r
if (fastPaint)\r
{\r
- g.drawImage(image, 0, 0, this);\r
fastPaint = false;\r
+ g.drawImage(image, 0, 0, this);\r
return;\r
}\r
\r
\r
void drawIds(int starty, int endy)\r
{\r
-\r
Color currentColor = Color.white;\r
Color currentTextColor = Color.black;\r
\r
-\r
if (av.getWrapAlignment())\r
{\r
\r