1 19 20 package org.netbeans.modules.javacore; 21 22 import javax.swing.SwingUtilities ; 23 import org.netbeans.modules.mdr.MDRManagerImpl; 24 25 29 public class ShutDownProgressListener implements MDRManagerImpl.ProgressListener { 30 31 private ShutDownProgressPanel progressPanel = null; 32 33 private ShutDownProgressPanel getPanel() { 34 if (progressPanel == null) { 35 progressPanel = ShutDownProgressPanel.getDefault(); 36 } 37 return progressPanel; 38 } 39 40 public void init() { 41 ((JMManager) JMManager.getManager()).cancelScanning(); 42 getPanel().setVisible(true); 43 } 44 45 public void start(final int count) { 46 SwingUtilities.invokeLater(new Runnable () { 47 public void run() { 48 getPanel().start(count); 49 } 50 }); 51 } 52 53 public void step() { 54 SwingUtilities.invokeLater(new Runnable () { 55 public void run() { 56 getPanel().step(); 57 } 58 }); 59 } 60 61 public void stop() { 62 SwingUtilities.invokeLater(new Runnable () { 63 public void run() { 64 getPanel().stop(); 65 getPanel().setVisible(false); 66 } 67 }); 68 } 69 } 70 | Popular Tags |