private void doHandleSelectionChange(@NotNull KeyType selected, boolean processIfUnfocused) {
    if (!isHandleSelectionEnabled(selected, processIfUnfocused)) {
      hideHint();
      return;
    }

    myKey = selected;

    ToolTipDetails details = calcToolTipDetails(myKey);

    if (details == null) {
      hideHint();
    }
    else {
      myKeyItemBounds = details.keyItemBounds;
      Rectangle bounds = details.bounds;
      Shape clip = details.clip;
      myTipComponent.setPreferredSize(bounds.getSize());
      if (!RENDER_IN_POPUP) {
        myImage = createPopupContent(bounds, details.painter, clip);
      }
      myPopup.setTransparent(clip != null);
      myPopup.setBounds(bounds);
      myPopup.onAncestorFocusLost(() -> onFocusLost());
      myPopup.setVisible(noIntersections(bounds));
      repaintKeyItem();
    }
  }
private void doHandleSelectionChange(@NotNull KeyType selected, boolean processIfUnfocused)