private boolean isHandleSelectionEnabled(@NotNull KeyType selected, boolean processIfUnfocused) {
   return myEnabled
       && myComponent.isEnabled()
       && myComponent.isShowing()
       && myComponent.getVisibleRect().intersects(getVisibleRect(selected))
       && (processIfUnfocused || myComponent.isFocusOwner())
       && !isPopup();
 }
  private void doHandleSelectionChange(@NotNull KeyType selected, boolean processIfUnfocused) {
    if (!myEnabled
        || !myComponent.isEnabled()
        || !myComponent.isShowing()
        || !myComponent.getVisibleRect().intersects(getVisibleRect(selected))
        || !myComponent.isFocusOwner() && !processIfUnfocused
        || isPopup()) {
      hideHint();
      return;
    }

    myKey = selected;

    Point location = createToolTipImage(myKey);

    if (location == null) {
      hideHint();
    } else {
      Rectangle bounds = new Rectangle(location, myTipComponent.getPreferredSize());
      myPopup.setBounds(bounds);
      myPopup.setVisible(noIntersections(bounds));
      repaintKeyItem();
    }
  }
 protected Rectangle getVisibleRect(KeyType key) {
   return myComponent.getVisibleRect();
 }