code: private void setScanButtonsAndProgressBarStates(boolean isStarted, boolean isPaused,
  			boolean allowStartScan) {
  		if (isStarted) {
  			getStartScanButton().setEnabled(false);
  			getPauseScanButton().setEnabled(true);
  			getPauseScanButton().setSelected(isPaused);
  			getStopScanButton().setEnabled(true);
  			getProgressBar().setEnabled(true);
  		} else {
  			getStartScanButton().setEnabled(allowStartScan);
  			getStopScanButton().setEnabled(false);
  			getPauseScanButton().setEnabled(false);
  			getPauseScanButton().setSelected(false);
  			getProgressBar().setEnabled(false);
  		}
  	}
docs: Method used for setting the state of the scan buttons and of the progress bar.
  <p>
  <strong>NOTE:</strong> Must be called from the main thread (EDT).
  
  @param isStarted {@code true} if the scan is started, {@code false} otherwise.
  @param isPaused {@code true} if the scan is paused, {@code false} otherwise.
  @param allowStartScan {@code true} if should possible to start a scan, {@code false} otherwise.