Exemple #1
0
 /** Dispatches a request to repaint the entire main frame. */
 private void repaintMainFrame() {
   SwingUtilities.invokeLater(
       new Runnable() {
         @Override
         public void run() {
           ClientController.this.mainFrame.repaint();
         }
       });
 }
Exemple #2
0
  /** @see nl.lxtreme.ols.api.devices.CaptureCallback#captureStarted(int, int, int) */
  @Override
  public synchronized void captureStarted(
      final int aSampleRate, final int aChannelCount, final int aChannelMask) {
    final Runnable runner =
        new Runnable() {
          @Override
          public void run() {
            updateActions();
          }
        };

    if (SwingUtilities.isEventDispatchThread()) {
      runner.run();
    } else {
      SwingUtilities.invokeLater(runner);
    }
  }