本文整理了Java中javax.swing.ProgressMonitor.setProgress()
方法的一些代码示例,展示了ProgressMonitor.setProgress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressMonitor.setProgress()
方法的具体详情如下:
包路径:javax.swing.ProgressMonitor
类名称:ProgressMonitor
方法名:setProgress
暂无
代码示例来源:origin: skylot/jadx
@Override
public void run() {
try {
decompiler.getArgs().setRootDir(dir);
ThreadPoolExecutor ex = (ThreadPoolExecutor) decompiler.getSaveExecutor();
ex.shutdown();
while (ex.isTerminating()) {
long total = ex.getTaskCount();
long done = ex.getCompletedTaskCount();
progressMonitor.setProgress((int) (done * 100.0 / (double) total));
Thread.sleep(500);
}
progressMonitor.close();
LOG.info("decompilation complete, freeing memory ...");
decompiler.getClasses().forEach(JavaClass::unload);
LOG.info("done");
} catch (InterruptedException e) {
LOG.error("Save interrupted", e);
Thread.currentThread().interrupt();
}
}
};
代码示例来源:origin: dermotte/LIRE
pm.setProgress(5);
pm.setNote("Starting clustering");
pm.setProgress(8);
pm.setNote("Step 1 finished");
pm.setProgress(11);
pm.setNote("Step 2 finished");
newStress = k.clusteringStep();
if (pm != null) { // set to XX of 100 after second step.
pm.setProgress(cStep * 3 + 5);
pm.setNote("Step " + cStep + " finished");
代码示例来源:origin: dermotte/LIRE
pm.setProgress(5);
pm.setNote("Starting clustering");
pm.setProgress(8);
pm.setNote("Step 1 finished");
pm.setProgress(11);
pm.setNote("Step 2 finished");
newStress = k.clusteringStep();
if (pm != null) { // set to XX of 100 after second step.
pm.setProgress(cStep * 3 + 5);
pm.setNote("Step " + cStep + " finished");
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
public void run()
{
progressMonitor.setProgress(value);
}
});
代码示例来源:origin: org.databene/databene-commons
@Override
public void setProgress(int progress) {
super.setProgress(progress);
this.progress = progress;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
@Override
public void makeProgress(String progressMessage) {
m_progress.setNote(progressMessage);
m_progressCount++;
m_progress.setProgress(m_progressCount);
}
代码示例来源:origin: org.boofcv/demonstrations
public void setMessage( final int state , final String message ) {
SwingUtilities.invokeLater(() -> {
monitor.setProgress(state);
monitor.setNote(message);
});
}
代码示例来源:origin: org.boofcv/demonstrations
public void run() {
monitor.setProgress(state);
monitor.setNote(message);
}});
}
代码示例来源:origin: org.boofcv/demonstrations
public void run() {
monitor.setProgress(state);
monitor.setNote(message);
}});
}
代码示例来源:origin: net.sf.jt400/jt400
/**
* Updates the progress Bar.
* @param num The number of records processed.
*/
public void updateProgress(int num) {
progressMonitor.setProgress(num);
progressMonitor.setNote((int)(((long)num)*100/((long)total)) + endmsg);
}
代码示例来源:origin: com.github.ansell.pellet/pellet-common
protected void resetProgress() {
super.resetProgress();
monitor = new javax.swing.ProgressMonitor( null, progressTitle, progressMessage, 0,
progressLength );
monitor.setProgress( progress );
}
代码示例来源:origin: net.sourceforge.owlapi/pellet-core-ignazio1977
protected void resetProgress() {
super.resetProgress();
monitor = new javax.swing.ProgressMonitor( null, progressTitle, progressMessage, 0,
progressLength );
monitor.setProgress( progress );
}
代码示例来源:origin: protegeproject/protege
private void adjustProgress(String taskDescription, int taskCount) {
if (monitor.isCanceled()) {
throw new ExportCancelledException();
}
monitor.setNote(taskDescription);
monitor.setProgress(taskCount);
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
private void adjustProgress(String taskDescription, int taskCount) {
if (monitor.isCanceled()) {
throw new ExportCancelledException();
}
monitor.setNote(taskDescription);
monitor.setProgress(taskCount);
}
代码示例来源:origin: org.protege/protege-editor-owl
private void adjustProgress(String taskDescription, int taskCount) {
if (monitor.isCanceled()) {
throw new ExportCancelledException();
}
monitor.setNote(taskDescription);
monitor.setProgress(taskCount);
}
代码示例来源:origin: cflint/CFLint
@Override
public void startedProcessing(final String srcidentifier) {
if (progressMonitor.isCanceled()) {
throw new RuntimeException("Cancelled by user");
}
if (indeterminate && fileCounter + 1 >= totalFileCount) {
totalFileCount += 10;
progressMonitor.setMaximum(totalFileCount);
}
progressMonitor.setProgress(fileCounter++);
progressMonitor.setNote("[" + fileCounter + "/" + totalFileCount + "] processing " + shorten(srcidentifier));
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
private void adjustProgress(String taskDescription, int taskCount) {
if (monitor.isCanceled()) {
throw new ExportCancelledException();
}
monitor.setNote(taskDescription);
monitor.setProgress(taskCount);
}
代码示例来源:origin: cytoscape.coreplugins/rfilters
public void run() {
if (pm.isCanceled()) {
applyFilterCanceled = true;
pm.close();
} else {
dCount = ((double) progressCount / (double) pm.getMaximum());
progressNote = ((int) (dCount * 100.0) + "% complete");
pm.setProgress(progressCount);
pm.setNote(progressNote);
}
}
};
代码示例来源:origin: protegeproject/protege
public Set<A> createAxioms(OWLDataFactory dataFactory, OWLReasoner reasoner) {
if (progressMonitor.isCanceled()) {
throw new ExportCancelledException();
}
progressMonitor.setNote(delegate.getLabel());
progressMonitor.setProgress(task);
return delegate.createAxioms(dataFactory, reasoner);
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
public Set<A> createAxioms(OWLDataFactory dataFactory, OWLReasoner reasoner) {
if (progressMonitor.isCanceled()) {
throw new ExportCancelledException();
}
progressMonitor.setNote(delegate.getLabel());
progressMonitor.setProgress(task);
return delegate.createAxioms(dataFactory, reasoner);
}
内容来源于网络,如有侵权,请联系作者删除!