* In unwrapped mode, only responds to a vertical scroll, as horizontal scroll * leaves sequence ids unchanged. In wrapped mode, only vertical scroll is * provided, but it generates a change of "startres" which does require an * update here. */ @Override public void propertyChange(PropertyChangeEvent evt) { // BH just clarifying logic String propertyName = evt.getPropertyName(); switch (propertyName) { case ViewportRanges.STARTSEQ: fastPaint((int) evt.getNewValue() - (int) evt.getOldValue()); return; case ViewportRanges.STARTRES: if (av.getWrapAlignment()) { fastPaint((int) evt.getNewValue() - (int) evt.getOldValue()); } return; case ViewportRanges.STARTRESANDSEQ: fastPaint(((int[]) evt.getNewValue())[1] - ((int[]) evt.getOldValue())[1]); return; case ViewportRanges.MOVE_VIEWPORT: repaint(); return; case ViewportRanges.ENDRES: case ViewportRanges.ENDSEQ: // ignore ?? return; } // BH 2019.07.27 was: // if (propertyName.equals(ViewportRanges.STARTSEQ) // || (av.getWrapAlignment() // && propertyName.equals(ViewportRanges.STARTRES))) // { // fastPaint((int) evt.getNewValue() - (int) evt.getOldValue()); // } // else if (propertyName.equals(ViewportRanges.STARTRESANDSEQ)) // { // fastPaint(((int[]) evt.getNewValue())[1] // - ((int[]) evt.getOldValue())[1]); // } // else if (propertyName.equals(ViewportRanges.MOVE_VIEWPORT)) // { // repaint(); // } } }