public synchronized void start() {
    if (isRunning()) return;

    super.start();
    myOriginalStarted = false;
    myStartupAlarm.addRequest(myShowRequest, SHOW_DELAY);
  }
  public synchronized void stop() {
    if (myOriginal.isRunning()) {
      myOriginal.stop();
    } else {
      myStartupAlarm.cancelAllRequests();
    }

    // needed only for correct assertion of !progress.isRunning() in
    // ApplicationImpl.runProcessWithProgressSynchroniously
    final Semaphore semaphore = new Semaphore();
    semaphore.down();

    SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            semaphore.waitFor();
            if (myDialog != null) {
              // System.out.println("myDialog.destroyProcess()");
              myDialog.close(DialogWrapper.OK_EXIT_CODE);
              myDialog = null;
            }
          }
        });

    super.stop(); // should be last to not leaveModal before closing the dialog
    semaphore.up();
  }
 public void setIndeterminate(boolean indeterminate) {
   super.setIndeterminate(indeterminate);
   myOriginal.setIndeterminate(indeterminate);
 }
 public void cancel() {
   super.cancel();
   myOriginal.cancel();
 }
 public synchronized void setText2(String text) {
   super.setText2(text);
   if (myOriginal.isRunning()) {
     myOriginal.setText2(text);
   }
 }
 public synchronized void setFraction(double fraction) {
   super.setFraction(fraction);
   if (myOriginal.isRunning()) {
     myOriginal.setFraction(fraction);
   }
 }