public Rectangle getAndClearRepaintBounds() { updateRange(); Rectangle rect = range.getRect(); range.clear(); updateRange(); return rect; }
/** Resizes the repaint range */ private void updateRange() { range.addRect(curve.getBounds()); }