/** * allows to set a custom initial delay for the progress task to appear in the * status bar. This delay marks the time between starting of the progress handle * and it's appearance in the status bar. If it finishes earlier, it's not shown at all. * There is a default < 1s value for this. If you want to to appear earlier or later, * call this method with the value you prefer before starting the handle. * <p> Progress bars that are placed in custom dialogs do always appear right away without a delay. * @param millis amount of miliseconds that shall pass before the progress appears in status bar. */ public void setInitialDelay(int millis) { handle.setInitialDelay(millis); }
public ProgressHandler(ProgressHandle handle, boolean indeterminate) { this.progressHandle = handle; this.isIndeterminate = indeterminate; this.progressHandle.setInitialDelay(10); }
/** Start the progress indication for indeterminate task. */ public void start(Integer delay) { if (modal) { progressComponent = ProgressHandleFactory.createProgressComponent(handle); } if (delay != null) { handle.setInitialDelay(delay.intValue()); } handle.start(); }
/** * Start the progress indication for indeterminate task. * it will be visualized by a progress bar in indeterminate mode. */ public void start() { synchronized (handle) { if (cancelled) { return; } if(!started) { started = true; handle.setInitialDelay(INITIAL_DELAY); if (problemDetector != null) { problemDetector.start(); } handle.start(); } } }
@Override protected void doInBackground() { ph.setInitialDelay(500); ph.start(); ResultsManager.getDefault().saveSnapshot(snapshot); }
@Override protected void doInBackground() { try { ph.setInitialDelay(500); ph.start(); if (!(file.getAbsolutePath().toLowerCase().endsWith("."+FILE_EXTENSION_NPS))) { ProfilerDialogs.displayError(Bundle.ExportAction_InvalidLocationForFileMsg()); return; } FileObject fo=FileUtil.createData(file); if (fo==null) { ProfilerDialogs.displayError(Bundle.ExportAction_InvalidLocationForFileMsg()); return; } ResultsManager.getDefault().saveSnapshot(snapshot, fo); } catch (IOException e1) { ProfilerDialogs.displayError(Bundle.ExportAction_CannotWriteFileMsg(e1.getLocalizedMessage())); LOGGER.log(Level.WARNING, e1.toString()); } }
public void actionPerformed(ActionEvent e) { if (t != null && !t.isFinished()) { t.cancel(); } final ProgressHandle handle = ProgressHandleFactory.createHandle(NbBundle.getMessage(ProjectAccessorImpl.class, "CTL_OpenKenaiProjectAction")); //NOI18N handle.setInitialDelay(0); handle.start(); t = RequestProcessor.getDefault().post(new Runnable() { public void run() { final KenaiProject kenaiProj = proj.getKenaiProject(); SwingUtilities.invokeLater(new Runnable() { public void run() { kenaiProjectTopComponent tc = kenaiProjectTopComponent.getInstance(kenaiProj); tc.open(); tc.requestActive(); } }); handle.finish(); } }); } };
progress.setInitialDelay(PROGRESS_INITIAL_DELAY); try { progress.start();
progress.setInitialDelay(PROGRESS_INITIAL_DELAY); try { progress.start();
public String export(final String exportPath, final String hostOS, final String jvm) throws IOException { if (impl == null) { throw new IOException(); } ProgressHandle ph = ProgressHandleFactory.createHandle( Bundle.RemotePackExporter_GeneratingRemotePack(impl.getRemotePackPath(exportPath, hostOS))); ph.setInitialDelay(500); ph.start(); try { return impl.export(exportPath, hostOS, jvm); } finally { ph.finish(); } }
mainWindow.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); final ProgressHandle progress = ProgressHandleFactory.createHandle(NbBundle.getMessage(CreateChatAction.class, "LBL_CheckPermissions")); progress.setInitialDelay(0); progress.start(); if (source!=null) source.setEnabled(true);
@Override protected void doInBackground() { ph.setInitialDelay(500); ph.start(); try { FileOutputStream fo; fo = new FileOutputStream(file); ExportDataDumper eDD = new ExportDataDumper(fo); exportProvider.exportData(exportedFileType, eDD); if (eDD.getCaughtException()!=null) { ProfilerDialogs.displayError(eDD.getNumExceptions()+Bundle.ExportAction_IOException_Exporting_Msg()); } } catch (OutOfMemoryError e) { ProfilerDialogs.displayError(Bundle.ExportAction_OomeExportingMsg()+e.getMessage()); } catch (IOException e1) { ProfilerDialogs.displayError(Bundle.ExportAction_CannotWriteFileMsg(e1.getLocalizedMessage())); LOGGER.log(Level.WARNING, e1.toString()); } }
ph.setInitialDelay(500); ph.start(); ProfilerUtils.runInProfilerRequestProcessor(new Runnable() {
pHandle.setInitialDelay(0); pHandle.start();
ph.setInitialDelay(500); ph.start();
pHandle.setInitialDelay(0); pHandle.start(); heapdumpTaken = targetApp.getProfilerClient().takeHeapDump(dumpFileName);