void (ChangeEvent event) { ReadAction.run(() -> { Rectangle viewRect = getVisibleArea(); VisibleAreaEvent visibleAreaEvent = new VisibleAreaEvent(mySupplier.getEditor(), myLastViewRect, viewRect); if (!myViewportPositioned && viewRect.height > 0) { myViewportPositioned = true; if (adjustVerticalOffsetIfNecessary()) { return; } } myLastViewRect = viewRect; for (VisibleAreaListener listener : myVisibleAreaListeners) { listener.visibleAreaChanged(visibleAreaEvent); } }); }