private void incrementProgressBar(final int progress) { if (taskMonitor == null) { return; } if (taskMonitor.isAborting()) { throw new TaskInterruptionException("Operation from " + this.getClass().getName() + " has been canceled"); //$NON-NLS-1$ //$NON-NLS-2$ } if (taskMonitor.isShowProgression()) { GuiExecutor.instance().execute(() -> { taskMonitor.setProgress(progress); StringBuilder buf = new StringBuilder(Messages.getString("MeanCollectionZprojection.operation")); //$NON-NLS-1$ buf.append(StringUtil.COLON_AND_SPACE); buf.append(progress); buf.append("/"); //$NON-NLS-1$ buf.append(taskMonitor.getMaximum()); taskMonitor.setNote(buf.toString()); }); } }
private void incrementProgressBar(final int progress) { if (taskMonitor == null) { return; } if (taskMonitor.isAborting()) { throw new TaskInterruptionException("Operation from " + this.getClass().getName() + " has been canceled"); //$NON-NLS-1$ //$NON-NLS-2$ } if (taskMonitor.isShowProgression()) { GuiExecutor.instance().execute(new Runnable() { @Override public void run() { taskMonitor.setProgress(progress); StringBuilder buf = new StringBuilder(Messages.getString("MinCollectionZprojection.operation")); //$NON-NLS-1$ buf.append(StringUtil.COLON_AND_SPACE); buf.append(progress); buf.append("/"); //$NON-NLS-1$ buf.append(taskMonitor.getMaximum()); taskMonitor.setNote(buf.toString()); } }); } }
private void incrementProgressBar(final int progress) { if (taskMonitor == null) { return; } if (taskMonitor.isAborting()) { throw new TaskInterruptionException("Operation from " + this.getClass().getName() + " has been canceled"); //$NON-NLS-1$ //$NON-NLS-2$ } if (taskMonitor.isShowProgression()) { GuiExecutor.instance().execute(() -> { taskMonitor.setProgress(progress); StringBuilder buf = new StringBuilder(Messages.getString("MaxCollectionZprojection.operation")); //$NON-NLS-1$ buf.append(StringUtil.COLON_AND_SPACE); buf.append(progress); buf.append("/"); //$NON-NLS-1$ buf.append(taskMonitor.getMaximum()); taskMonitor.setNote(buf.toString()); }); } }
throw new TaskInterruptionException("Rebuilding MIP series has been canceled!"); //$NON-NLS-1$ throw new TaskInterruptionException("Rebuilding MIP series has been canceled!"); //$NON-NLS-1$