/* (non-Javadoc)
@see ca.eandb.util.progress.ProgressMonitorFactory#createProgressMonitor(java.lang.String)
340665
public ProgressMonitor createProgressMonitor(String title) {
    ProgressState state = new ProgressState(title);
    states.add(state);
    return state;
  }
167509
public WorkProgress createTaskProgress(long amount, String text) {
		this.amount += amount;
		SubWorkProgress task = new SubWorkProgress(this, amount, amount, text);
		synchronized (tasks) {
			tasks.add(task);
			if (jp != null) jp.addToJoinDoNotCancel(task.getSynch());
		}
		return task;
	}
358462
public void showProgress(final int id, final int sofar, final int total) {
        final T notification = get(id);

        if (notification == null) {
            return;
        }

        notification.updateStatus(FileDownloadStatus.progress);
        notification.update(sofar, total);
    }
394596
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException {
        getLogText().doProgressText(req, rsp);
    }
409016
public void progress(float progress) throws IOException {
    progressValue = progress;
    reporter.progress();
    
    if (recordReader != null) {
      progressKey.set(progress);
      recordReader.next(progressKey, nullValue);
    }
  }
683531
public void setProgress(CmsUploadProgessInfo info) {

        int currFile = info.getCurrentFile();

        int currFileIndex = 0;
        if (currFile == 0) {
            // no files read so far
        } else {
            currFileIndex = currFile - 1;
            if (currFileIndex >= m_orderedFilenamesToUpload.size()) {
                currFileIndex = m_orderedFilenamesToUpload.size() - 1;
            }
        }

        if (m_contentLength == 0) {
            m_contentLength = info.getContentLength();
        }

        String currFilename = m_orderedFilenamesToUpload.get(currFileIndex);
        String contentLength = CmsUploadButton.formatBytes(m_contentLength);
        int fileCount = m_orderedFilenamesToUpload.size();
        String readBytes = CmsUploadButton.formatBytes(getBytesRead(info.getPercent()));

        m_bar.setValue(info.getPercent());

        if (!m_started) {
            m_started = true;
            m_fileinfo.setHTML(0, 0, "<b>" + Messages.get().key(Messages.GUI_UPLOAD_PROGRESS_CURRENT_FILE_0) + "</b>");
            m_fileinfo.setHTML(1, 0, "<b>" + Messages.get().key(Messages.GUI_UPLOAD_PROGRESS_UPLOADING_0) + "</b>");
            m_fileinfo.setHTML(2, 0, "");

            m_fileinfo.setText(0, 1, "");
            m_fileinfo.setText(1, 1, "");
            m_fileinfo.setText(2, 1, "");

            m_fileinfo.getColumnFormatter().setWidth(0, "100px");
        }

        m_fileinfo.setText(0, 1, currFilename);
        m_fileinfo.setText(
            1,
            1,
            Messages.get().key(
                Messages.GUI_UPLOAD_PROGRESS_CURRENT_VALUE_3,
                new Integer(currFileIndex + 1),
                new Integer(fileCount),
                getFileText()));
        m_fileinfo.setText(
            2,
            1,
            Messages.get().key(Messages.GUI_UPLOAD_PROGRESS_UPLOADING_VALUE_2, readBytes, contentLength));
    }
897050
static public String createMonitor(String monitorUrl,
            Node parserInstruction, String modifiesResponse, TECore core) {
        MonitorCall mc = monitors.get(monitorUrl);
        mc.setCore(core);
        if (parserInstruction != null) {
            mc.setParserInstruction(DomUtils.getElement(parserInstruction));
            mc.setModifiesResponse(Boolean.parseBoolean(modifiesResponse));
        }
        LOGR.log(Level.CONFIG, "Configured monitor without test:\n {0}", mc);
        return "";
    }
1167476
private OnDemandStatsProducer<PageInBrowserStats> createProducer(final String producerId, final String category, final String subsystem) {
		OnDemandStatsProducer<PageInBrowserStats> producer = limit == -1 ? new OnDemandStatsProducer<PageInBrowserStats>(producerId, category, subsystem, new PageInBrowserStatsFactory()) :
				new EntryCountLimitedOnDemandStatsProducer<PageInBrowserStats>(producerId, category, subsystem, new PageInBrowserStatsFactory(), limit);

		ProducerRegistryFactory.getProducerRegistryInstance().registerProducer(producer);
		return producer;
	}
1355370
private void updateProgressButton(ProgressButton progressButton, SeekBar progressSeekBar) {
    progressButton.setProgress(progressSeekBar.getProgress());
    updatePinProgressContentDescription(progressButton);
  }
805955
protected void updateProgress() {

        CmsRpcAction<CmsUploadProgessInfo> callback = new CmsRpcAction<CmsUploadProgessInfo>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                getUploadService().getUploadProgressInfo(this);
            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onFailure(java.lang.Throwable)
             */
            @Override
            public void onFailure(Throwable t) {

                super.onFailure(t);
                cancelUpdateProgress();
            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(CmsUploadProgessInfo result) {

                updateProgressBar(result);
            }
        };
        callback.execute();
    }
269181
public JMProgressiveManager<T, R>
			registerCountChangeListener(Consumer<Number> countChangeListener) {
		return registerListener(progressiveCount, countChangeListener);
	}
505980
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException {
        AnnotatedLargeText text = obtainLog();
        if(text!=null) {
            text.doProgressText(req,rsp);
            return;
        }
        rsp.setStatus(HttpServletResponse.SC_OK);
    }
1269067
public void setProgressBar(final ProgressBar progressBar,final int progress) {
		if(progressBar != null){
			Activity activity = activityUtils.getCurrentActivity(false);
			if(activity != null){
				activity.runOnUiThread(new Runnable()
				{
					public void run()
					{
						try{
							progressBar.setProgress(progress);
						}catch (Exception ignored){}
					}
				});
			}
		}
	}
1008985
public ProgressBarField<T> addProgressBarField(int viewResId,
                                                   IntegerExtractor<T> progressExtractor,
                                                   IntegerExtractor<T> maxProgressExtractor) {

        ProgressBarField<T> field =
                new ProgressBarField<T>(viewResId, progressExtractor, maxProgressExtractor);

        mProgressBarFields.add(field);

        return field;
    }
155527
public void setProgress(int progress) {
        if (progress > mMax || progress < 0) {
            throw new IllegalArgumentException(
                    String.format("Progress (%d) must be between %d and %d", progress, 0, mMax));
        }
        mProgress = progress;
        if (null != mListener) {
            if (mProgress == mMax) {
                mListener.onProgressCompleted();
            } else {
                mListener.onProgressChanged(mProgress, mMax);
            }
        }
        invalidate();
    }
845598
protected boolean postCompileJava(IProgressMonitor progress) {
		assert progress != null;
		progress.subTask(Messages.SarlBatchCompiler_52);
		final File classOutputPath = getClassOutputPath();
		if (classOutputPath == null) {
			getLogger().info(Messages.SarlBatchCompiler_24);
			return true;
		}
		getLogger().info(Messages.SarlBatchCompiler_25);
		final Iterable<File> sources = Iterables.concat(getSourcePaths(), Collections.singleton(getOutputPath()));
		if (getLogger().isDebugEnabled()) {
			getLogger().debug(Messages.SarlBatchCompiler_29, toPathString(sources));
		}
		final List<File> classpath = getClassPath();
		if (getLogger().isDebugEnabled()) {
			getLogger().debug(Messages.SarlBatchCompiler_30, toPathString(classpath));
		}
		return runJavaCompiler(classOutputPath, sources, classpath, true, true, progress);
	}
372396
public static WatchMonitor create(URI uri, int maxDepth, WatchEvent.Kind<?>... events){
		return create(Paths.get(uri), maxDepth, events);
	}