/** Refresh the data in this table. */
 public void refreshTable() {
   Runnable refresh =
       new Runnable() {
         public synchronized void run() {
           tableChanged(new TableModelEvent(tableModel, TableModelEvent.HEADER_ROW));
           refreshCellWidths();
         }
       };
   if (SwingUtilities.isEventDispatchThread()) {
     refresh.run();
   } else {
     SwingUtilities.invokeLater(refresh);
   }
 }
 /** Freeze repaint to avoid repainting during changing the Graph. */
 public void executeWithoutRepaint(@NotNull Runnable action) {
   myRepaintFreezed = true;
   try {
     action.run();
   } finally {
     myRepaintFreezed = false;
   }
 }
示例#3
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);
    }
  }
 public void setSelected(AnActionEvent event, boolean flag) {
   DependencyUISettings.getInstance().UI_FILTER_LEGALS = flag;
   UIUtil.setEnabled(myLegendPanel, !flag, true);
   myUpdate.run();
 }