void updateLater(boolean force) {
    if (!force && (!myIsVisible || updateOptions == 0 || myNativePeer == ID.NIL)) {
      return;
    }

    if (rasterPromise != null && !rasterPromise.isDone()) {
      rasterPromise.cancel();
    }

    rasterPromise = new AsyncPromise<>();
    rasterPromise.onSuccess(raster -> {
      //
      // update native peer
      //
      int updateOptions = this.updateOptions;
      String text = (updateOptions & NSTLibrary.BUTTON_UPDATE_TEXT) != 0 ? myText : null;
      String hint = (updateOptions & NSTLibrary.BUTTON_UPDATE_TEXT) != 0 ? myHint : null;
      NSTLibrary.Action callback = (updateOptions & NSTLibrary.BUTTON_UPDATE_ACTION) != 0 ? nativeCallback : null;
      int validFlags = _validateFlags();
      int isHintDisabled = myIsHintDisabled ? 1 : 0;
      int layoutBits = myLayoutBits;

      this.updateOptions = 0;

      synchronized (this) {
        if (myNativePeer.equals(ID.NIL)) {
          return;
        }
        NST.updateButton(myNativePeer, updateOptions, layoutBits, validFlags, text, hint, isHintDisabled, raster, callback);
      }
    });

    ourExecutor.execute(() -> {
      if (originIcon == null || (!force && (updateOptions & NSTLibrary.BUTTON_UPDATE_IMG) == 0)) {
        if (TEST_DELAY_MS > 0) waitTheTestDelay();
        rasterPromise.setResult(null);
        return;
      }

      // load icon (can be quite slow)
      long startNs = actionStats == null ? 0 : System.nanoTime();
      if (TEST_DELAY_MS > 0) {
        waitTheTestDelay();
      }

      Icon icon = getDarkIcon(originIcon);
      if (icon != null && isGetDisabledIconNeeded) {
        icon = IconLoader.getDisabledIcon(icon);
      }

      // prepare raster (not very fast)
      Pair<Pointer, Dimension> raster = NST.get4ByteRGBARaster(icon);
      if (actionStats != null && raster != null) {
        actionStats.iconUpdateIconRasterCount++;
        actionStats.iconRenderingDurationNs += System.nanoTime() - startNs;
      }

      rasterPromise.setResult(raster);
    });
  }
void updateLater(boolean force)