Beispiel #1
0
  public synchronized void start() {
    if (isRunning()) return;

    super.start();
    myOriginalStarted = false;
    myStartupAlarm.addRequest(myShowRequest, SHOW_DELAY);
  }
Beispiel #2
0
  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();
  }
Beispiel #3
0
 public void setIndeterminate(boolean indeterminate) {
   super.setIndeterminate(indeterminate);
   myOriginal.setIndeterminate(indeterminate);
 }
Beispiel #4
0
 public void cancel() {
   super.cancel();
   myOriginal.cancel();
 }
Beispiel #5
0
 public synchronized void setText2(String text) {
   super.setText2(text);
   if (myOriginal.isRunning()) {
     myOriginal.setText2(text);
   }
 }
Beispiel #6
0
 public synchronized void setFraction(double fraction) {
   super.setFraction(fraction);
   if (myOriginal.isRunning()) {
     myOriginal.setFraction(fraction);
   }
 }