コード例 #1
0
 /** 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);
   }
 }
コード例 #2
0
 /** 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
ファイル: ClientController.java プロジェクト: piopawlu/ols
  /** @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);
    }
  }
コード例 #4
0
 public void setSelected(AnActionEvent event, boolean flag) {
   DependencyUISettings.getInstance().UI_FILTER_LEGALS = flag;
   UIUtil.setEnabled(myLegendPanel, !flag, true);
   myUpdate.run();
 }