public void propertyChange(PropertyChangeEvent evt)
{
// Respond to viewport range changes (e.g. alignment panel was scrolled)
- if (evt.getPropertyName().equals("startseq")
- || evt.getPropertyName().equals("endseq"))
+ // 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 (evt.getPropertyName().equals(ViewportRanges.STARTSEQ))
{
fastPaint((int) evt.getNewValue() - (int) evt.getOldValue());
}