Пример #1
0
  /** Mutes or unmutes the associated <tt>Call</tt> upon clicking this button. */
  public void toggleMute() {
    if (muteRunner == null) {
      muteRunner = new Thread(this, getToolTipText());
      muteRunner.setDaemon(true);

      setEnabled(false);
      muteRunner.start();
    }
  }
Пример #2
0
 /** Toggles state on call in different thread. */
 public void run() {
   try {
     doRun();
   } finally {
     synchronized (this) {
       if (Thread.currentThread().equals(muteRunner)) {
         muteRunner = null;
         setEnabled(true);
       }
     }
   }
 }