void (@NotNull Point targetLocation, @NotNull ScrollType scrollType) { AnimatedScrollingRunnable canceledThread = cancelAnimatedScrolling(false); Rectangle viewRect = canceledThread == null ? getVisibleArea() : canceledThread.getTargetVisibleArea(); Point p = calcOffsetsToScroll(targetLocation, scrollType, viewRect); scroll(p.x, p.y); }