コード例 #1
0
  public IdeTooltip show(final IdeTooltip tooltip, boolean now, final boolean animationEnabled) {
    myAlarm.cancelAllRequests();

    hideCurrent(null, null, null);

    myQueuedComponent = tooltip.getComponent();
    myQueuedTooltip = tooltip;

    myShowRequest =
        new Runnable() {
          @Override
          public void run() {
            if (myShowRequest == null) {
              return;
            }

            if (myQueuedComponent != tooltip.getComponent()
                || !tooltip.getComponent().isShowing()) {
              hideCurrent(null, null, null, animationEnabled);
              return;
            }

            if (tooltip.beforeShow()) {
              show(tooltip, null, animationEnabled);
            } else {
              hideCurrent(null, null, null, animationEnabled);
            }
          }
        };

    if (now) {
      myShowRequest.run();
    } else {
      myAlarm.addRequest(
          myShowRequest, myShowDelay ? tooltip.getShowDelay() : tooltip.getInitialReshowDelay());
    }

    return tooltip;
  }