コード例 #1
0
 /** Freeze repaint to avoid repainting during changing the Graph. */
 public void executeWithoutRepaint(@NotNull Runnable action) {
   myRepaintFreezed = true;
   try {
     action.run();
   } finally {
     myRepaintFreezed = false;
   }
 }
コード例 #2
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);
   }
 }