void (ScaledImageProvider imageProvider, String format) { ImageDocument document = imageComponent.getDocument(); BufferedImage previousImage = document.getValue(); document.setValue(imageProvider); if (imageProvider == null) return; document.setFormat(format); if (previousImage == null || !zoomModel.isZoomLevelChanged()) { ZoomOptions zoomOptions = getZoomOptions(); if (!(zoomOptions.isSmartZooming() && updateZoomFactor())) { zoomModel.setZoomFactor(1.0); } } }