private void createUI() {
    if (cellRenderer == null || list == null) {
      cellRenderer = new ThumbnailListCellRenderer();
      ImageComponent imageComponent = cellRenderer.getImageComponent();

      VirtualFileManager.getInstance().addVirtualFileListener(new VFSListener(), this);

      Options options = OptionsManager.getInstance().getOptions();
      EditorOptions editorOptions = options.getEditorOptions();
      // Set options
      TransparencyChessboardOptions chessboardOptions = editorOptions.getTransparencyChessboardOptions();
      imageComponent.setTransparencyChessboardVisible(chessboardOptions.isShowDefault());
      imageComponent.setTransparencyChessboardCellSize(chessboardOptions.getCellSize());
      imageComponent.setTransparencyChessboardWhiteColor(chessboardOptions.getWhiteColor());
      imageComponent.setTransparencyChessboardBlankColor(chessboardOptions.getBlackColor());
      imageComponent.setFileNameVisible(editorOptions.isFileNameVisible());
      imageComponent.setFileSizeVisible(editorOptions.isFileSizeVisible());

      options.addPropertyChangeListener(new OptionsChangeListener(), this);

      list = new JBList<>();
      list.setModel(new DefaultListModel<>());
      list.setLayoutOrientation(JList.HORIZONTAL_WRAP);
      list.setVisibleRowCount(-1);
      list.setCellRenderer(cellRenderer);
      list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
      list.addListSelectionListener(e -> updateTagsPreviewModel());

      ThumbnailsMouseAdapter mouseListener = new ThumbnailsMouseAdapter();
      list.addMouseListener(mouseListener);
      list.addMouseMotionListener(mouseListener);

      ThumbnailComponentUI componentUI = (ThumbnailComponentUI)ThumbnailComponentUI.createUI(cellRenderer);
      Dimension preferredSize = componentUI.getPreferredSize(cellRenderer);

      list.setFixedCellWidth(preferredSize.width);
      list.setFixedCellHeight(preferredSize.height);


      JScrollPane scrollPane =
        ScrollPaneFactory.createScrollPane(list, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
                                           ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
      scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP));

      ActionManager actionManager = ActionManager.getInstance();
      ActionGroup actionGroup = (ActionGroup)actionManager.getAction(ThumbnailViewActions.GROUP_TOOLBAR);
      ActionToolbar actionToolbar = actionManager.createActionToolbar(
        ThumbnailViewActions.ACTION_PLACE, actionGroup, true
      );
      actionToolbar.setTargetComponent(this);

      JComponent toolbar = actionToolbar.getComponent();

      FocusRequester focusRequester = new FocusRequester();
      toolbar.addMouseListener(focusRequester);
      scrollPane.addMouseListener(focusRequester);

      add(toolbar, BorderLayout.NORTH);

      previewSplitter = new Splitter();
      previewSplitter.setFirstComponent(scrollPane);
      previewSplitter.setProportion(1);
      previewSplitter.setSecondComponent(null);
      add(previewSplitter, BorderLayout.CENTER);
    }
    updateTagsPreview();
  }
private void createUI()