public void done() {
      if (checkIsInProgressAndComplete()) {
        invokeLater(() -> {
          myLock.lock();
          try {
            if (!myCancelled) {
              clearUI();
            }
          }
          finally {
            myLock.unlock();
          }
        });
      }
    }
public void done()