private void hideHint() {
   myUpdateAlarm.cancelAllRequests();
   if (myPopup.isVisible()) {
     myPopup.setVisible(false);
     repaintKeyItem();
   }
   myKey = null;
 }
  private void doHandleSelectionChange(@NotNull KeyType selected, boolean processIfUnfocused) {
    if (!isHandleSelectionEnabled(selected, processIfUnfocused)) {
      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();
    }
  }
 public boolean isShowing() {
   return myPopup.isVisible();
 }