javax.swing.ProgressMonitor.isCanceled()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中javax.swing.ProgressMonitor.isCanceled()方法的一些代码示例,展示了ProgressMonitor.isCanceled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressMonitor.isCanceled()方法的具体详情如下:
包路径:javax.swing.ProgressMonitor
类名称:ProgressMonitor
方法名:isCanceled

ProgressMonitor.isCanceled介绍

暂无

代码示例

代码示例来源:origin: net.sf.jt400/jt400

/**
   * The state of the Progress Dialog.
   * @return true if the dialog has been canceled.
   */
  public boolean isCanceled() {
    return progressMonitor.isCanceled();
  }
}

代码示例来源:origin: Galigator/openllet

@Override
public boolean isCanceled()
{
  return _monitor.isCanceled();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

boolean isProgressCancelled() {
  if (progressMonitor == null) {
    return false;
  } else {
    return progressMonitor.isCanceled();
  }
}

代码示例来源:origin: Galigator/openllet

@Override
public boolean isCanceled()
{
  return _monitor.isCanceled();
}

代码示例来源:origin: bcdev/beam

public boolean isReadingCanceled() {
    return progressMonitor.isCanceled();
  }
}

代码示例来源:origin: lbalazscs/Pixelitor

private void onProgress(int progress,
            ProgressMonitor progressMonitor) {
  progressMonitor.setProgress(progress);
  progressMonitor.setNote(format("Completed %d%%.\n", progress));
  if (progressMonitor.isCanceled()) {
    // Probably nothing bad happens if the current frame rendering is
    // interrupted, but to be on the safe side, let the current frame
    // finish by passing false to cancel
    cancel(false);
  }
}

代码示例来源: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: protegeproject/protege

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: org.apache.uima/uimaj-tools

/**
 * Check progress monitor.
 */
private void checkProgressMonitor() {
 // if user has clicked cancel, abort
 if (progressMonitor.isCanceled()) {
  progressMonitor.setNote("Cancelling...");
  mCPM.stop();
  aborted();
 }
}

代码示例来源: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: 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: 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/org.protege.editor.owl

public Set<A> createAxioms(OWLOntologyManager manager, OWLReasoner reasoner) {
  if (progressMonitor.isCanceled()) {
    throw new ExportCancelledException();
  }
  progressMonitor.setNote(delegate.getLabel());
  progressMonitor.setProgress(task);
  return delegate.createAxioms(manager, 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);
}

代码示例来源:origin: org.protege/protege-editor-owl

public Set<A> createAxioms(OWLOntologyManager manager, OWLReasoner reasoner) {
  if (progressMonitor.isCanceled()) {
    throw new ExportCancelledException();
  }
  progressMonitor.setNote(delegate.getLabel());
  progressMonitor.setProgress(task);
  return delegate.createAxioms(manager, reasoner);
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/dbcopy

public void run()
 {
   if (pm.isCanceled())
   {
   }
   // i18n[CopyProgressMonitor.analyzingTableMessage=Analyzing table ]
   pm.setNote(getMessage("CopyProgressMonitor.analyzingTableMessage") + e.getTableName());
   pm.setProgress(e.getTableNumber());
 }
};

代码示例来源:origin: MegaMek/mekhq

@Override
public void propertyChange(PropertyChangeEvent arg0) {
  progressMonitor.setProgress(access.getProgress());
  progressMonitor.setNote(access.getProgressNote());
  if (progressMonitor.isCanceled()) {
    access.cancel(true);
    access.close();
  } 
  if (access.isDone()) {
    //nothing
  }
}

相关文章