fastpainting = true;
fastPaint = true;
updateViewport();
- gg.copyArea(horizontal * charWidth, vertical * charHeight, imgWidth,
- imgHeight, -horizontal * charWidth, -vertical * charHeight);
ViewportRanges ranges = av.getRanges();
int sr = ranges.getStartRes();
int transX = 0;
int transY = 0;
+ gg.copyArea(horizontal * charWidth, vertical * charHeight, imgWidth,
+ imgHeight, -horizontal * charWidth, -vertical * charHeight);
+
if (horizontal > 0) // scrollbar pulled right, image to the left
{
transX = (er - sr - horizontal) * charWidth;
{
if (!av.getWrapAlignment())
{
- if (evt.getPropertyName().equals("startres"))
+ int scrollX = 0;
+ if ((evt.getPropertyName().equals("startres"))
+ || (evt.getPropertyName().equals("endres")))
{
- // scroll - startres and endres both change
-
// Make sure we're not trying to draw a panel
// larger than the visible window
ViewportRanges vpRanges = av.getRanges();
- int scrollX = (int) evt.getNewValue() - (int) evt.getOldValue();
+ scrollX = (int) evt.getNewValue() - (int) evt.getOldValue();
if (scrollX > vpRanges.getEndRes() - vpRanges.getStartRes())
{
scrollX = vpRanges.getEndRes() - vpRanges.getStartRes();
{
scrollX = vpRanges.getStartRes() - vpRanges.getEndRes();
}
+ }
+
+ if (evt.getPropertyName().equals("startres"))
+ {
+ // scroll - startres and endres both change
fastPaint(scrollX, 0);
}
else if (evt.getPropertyName().equals("endres"))
{
// resize - only endres changes
+
}
else if (evt.getPropertyName().equals("startseq"))
{
else if (evt.getPropertyName().equals("endseq"))
{
// resize
+
}
}
}