TBItemButton setAction(Runnable action, boolean executeOnEDT) {
    if (action == this.action && this.executeOnEdt == executeOnEDT) {
      return this;
    }

    this.action = action;
    this.executeOnEdt = executeOnEDT;
    if (action == null) {
      nativeCallback = null;
    }
    else {
      nativeCallback = () -> {
        // NOTE: executed from AppKit thread
        if (executeOnEdt) {
          Application app = ApplicationManager.getApplication();
          if (modality == null) {
            app.invokeLater(this.action);
          }
          else {
            app.invokeLater(this.action, modality);
          }
        }
        else {
          this.action.run();
        }

        ActivityTracker.getInstance().inc();

        if (myListener != null) {
          myListener.onItemEvent(this, 0);
        }
      };
    }

    updateOptions |= NSTLibrary.BUTTON_UPDATE_ACTION;

    return this;
  }
TBItemButton setAction(Runnable action, boolean executeOnEDT)