import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
-import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.util.List;
{
scrollX = -range;
}
+ }
- // Both scrolling and resizing change viewport ranges: scrolling changes
- // both start and end points, but resize only changes end values.
- // Here we only want to fastpaint on a scroll, with resize using a normal
- // paint, so scroll events are identified as changes to the horizontal or
- // vertical start value.
- if (eventName.equals(ViewportRanges.STARTRES))
- {
- if (av.getWrapAlignment())
- {
- fastPaintWrapped(scrollX);
- }
- else
- {
- fastPaint(scrollX, 0);
- }
- }
- else if (eventName.equals(ViewportRanges.STARTSEQ))
+ // Both scrolling and resizing change viewport ranges: scrolling changes
+ // both start and end points, but resize only changes end values.
+ // Here we only want to fastpaint on a scroll, with resize using a normal
+ // paint, so scroll events are identified as changes to the horizontal or
+ // vertical start value.
+ if (eventName.equals(ViewportRanges.STARTRES))
+ {
+ if (av.getWrapAlignment())
{
- // scroll
- fastPaint(0, (int) evt.getNewValue() - (int) evt.getOldValue());
+ fastPaintWrapped(scrollX);
}
- else if (eventName.equals(ViewportRanges.STARTRESANDSEQ))
+ else
{
fastPaint(scrollX, 0);
- // bizarrely, we only need to scroll on the x value here as fastpaint
- // copies the full height of the image anyway. Passing in the y value
- // causes nasty repaint artefacts, which only disappear on a full
- // repaint.
}
}
+ else if (eventName.equals(ViewportRanges.STARTSEQ))
+ {
+ // scroll
+ fastPaint(0, (int) evt.getNewValue() - (int) evt.getOldValue());
+ }
+ else if (eventName.equals(ViewportRanges.STARTRESANDSEQ))
+ {
+ fastPaint(scrollX, 0);
+ // bizarrely, we only need to scroll on the x value here as fastpaint
+ // copies the full height of the image anyway. Passing in the y value
+ // causes nasty repaint artefacts, which only disappear on a full
+ // repaint.
+ }
}
/**