void () { if (isEmbedded) return; ImageDocument document = imageComponent.getDocument(); BufferedImage image = document.getValue(); if (image != null) { ColorModel colorModel = image.getColorModel(); String format = document.getFormat(); if (format == null) { format = editor != null ? ImagesBundle.message("unknown.format") : ""; } else { format = StringUtil.toUpperCase(format); } VirtualFile file = editor != null ? editor.getFile() : null; infoLabel.setText( ImagesBundle.message("image.info", image.getWidth(), image.getHeight(), format, colorModel.getPixelSize(), file != null ? StringUtil.formatFileSize(file.getLength()) : "")); } else { infoLabel.setText(null); } }