/** * Notify the user about completed workunits. * This method has to be called after calling <code>start</code> method and before calling <code>finish</code> method (the task has to be running). * @param workunit a cumulative number of workunits completed so far */ public void progress(int workunit) { progress(null, workunit); }
/** * Notify the user about progress by showing message with details. * This method has to be called after calling <code>start</code> method and before calling <code>finish</code> method (the task has to be running). * @param message details about the status of the task */ public void progress(String message) { progress(message, InternalHandle.NO_INCREASE); }
public void close() { value = max; progress.progress(max); } }
private void updateProgress() throws IOException { double current = ((double)alreadyRead / (double)expectedSize) * 100.0; if (current >= MAX_WORKUNITS) { current = 295; } if (lastProgress < (int)current){ lastProgress = (int)current; } handle.progress(lastProgress); } }
private void setProgress() { if(progressHandle!=null) { progressHandle.progress(displayName); } }
public void processLine(String line) { value += step; if (value > max) { value = max; } progress.progress(value); }
public void finishingDownload() { String msg = NbBundle.getMessage( NewPhpProjectWizardIterator.class, "LBL_NewPhpProjectWizardIterator_WizardProgress_PreparingToOpen"); handle.progress(msg, 10); } }
public void finishingExtending() { String msg = NbBundle.getMessage( NewPhpProjectWizardIterator.class, "LBL_NewPhpProjectWizardIterator_WizardProgress_PreparingToOpen"); handle.progress(msg, units); } }
public void startingDownload() { String msg = NbBundle.getMessage( NewPhpProjectWizardIterator.class, "LBL_NewPhpProjectWizardIterator_WizardProgress_StartingDownload"); handle.progress(msg, 5); }
public void extending(String framework) { unit += 2; String msg = NbBundle.getMessage( NewPhpProjectWizardIterator.class, "LBL_NewPhpProjectWizardIterator_WizardProgress_Extending", framework); handle.progress(msg, unit); }
@Override public void starting() { handle.start(10); String msg = NbBundle.getMessage( NewPhpProjectWizardIterator.class, "LBL_NewPhpProjectWizardIterator_WizardProgress_CreatingProject"); handle.progress(msg, 2); }
private void stopLoading() { loadingStarted = false; if (progress != null) { progress.progress(1); progress.finish(); progress = null; } }
@Override public void propertyChange(PropertyChangeEvent evt) { if (progressPropertyName.equalsIgnoreCase(evt.getPropertyName())) { handle.progress((Integer) evt.getNewValue()); } else if (finishPropertyName.equalsIgnoreCase(evt.getPropertyName())) { handle.finish(); } } }
@Override public void starting() { handle.start(units); String msg = NbBundle.getMessage( NewPhpProjectWizardIterator.class, "LBL_NewPhpProjectWizardIterator_WizardProgress_CreatingProject"); handle.progress(msg, 2); }
private void updateProgress(ProgressHandle progress, List<List<Node>> list) { int count = 0; for(int i = 0; i < list.size(); i++) { count += list.get(i).size(); } if (count%100 == 0) { progress.progress(getMessage("ExpandedProgress", count, list.size())); // NOI18N } }
@Override public void setSubTaskName(String subTaskName) { Assert.notNull(progressHandle); progressHandle.progress(subTaskName); }
@Override public void operationStart(Operation operation, Collection<TransferFile> forFiles) { if (operations.isEmpty()) { assert workUnits >= 0 : workUnits + " :: " + forFiles; progressHandle.start(workUnits); } operations.offerFirst(operation); if (operation == Operation.LIST) { progressHandle.progress(NbBundle.getMessage(RemoteCommand.class, "LBL_ListingFiles", forFiles.iterator().next().getName())); progressHandle.switchToIndeterminate(); } }
public void run() { if (active) { p.progress(pm.getText(), pm.getPercentComplete()); } } });
@Messages({"# {0} - repo name", "LBL_unpacking=Unpacking index for {0}"}) void unpackingProgress(String label) { checkCancel(); if (unpacking.compareAndSet(false, true)) { handle.setDisplayName(LBL_unpacking(info.getName())); } handle.progress(label); }
public @Override void transferInitiated(TransferEvent e) { String u = e.getWagon().getRepository().getUrl() + e.getResource(); LOG.log(Level.FINE, "initiated transfer: {0}", u); handle.progress(u); checkCancel(); }