boolean () { ZoomOptions zoomOptions = getZoomOptions(); if (zoomOptions.isSmartZooming() && !zoomModel.isZoomLevelChanged()) { Double smartZoomFactor = zoomOptions.getSmartZoomFactor(imageComponent.getDocument().getBounds(), myScrollPane.getViewport().getExtentSize(), ImageComponent.IMAGE_INSETS); if (smartZoomFactor != null) { zoomModel.setZoomFactor(smartZoomFactor); return true; } } return false; }