本文整理了Java中javax.swing.ProgressMonitor.setMinimum()
方法的一些代码示例,展示了ProgressMonitor.setMinimum()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressMonitor.setMinimum()
方法的具体详情如下:
包路径:javax.swing.ProgressMonitor
类名称:ProgressMonitor
方法名:setMinimum
暂无
代码示例来源:origin: cytoscape.coreplugins/rfilters
public void run() {
pm.setMinimum(minCount);
pm.setMaximum(maxCount);
}
};
代码示例来源:origin: org.vesalainen.dsql/dsql
@Override
protected void startProgressMonitor(int min, int max)
{
if (progressMonitor != null)
{
System.err.println("startProgressMonitor("+min+", "+max+")");
progressMonitor.setMinimum(min);
progressMonitor.setMaximum(max);
}
}
代码示例来源:origin: bcdev/beam
public void onReadStarted(long numBytesTotal) {
progressMonitor.setMinimum(0);
progressMonitor.setMaximum((int) numBytesTotal);
}
代码示例来源:origin: stackoverflow.com
// using a File just for demonstration / testing
File f = new File("a");
try (InputStream stream = new FileInputStream(f)) {
ProgressMonitorInputStream pmis = new ProgressMonitorInputStream(null, "Downloading...", stream);
int downloadSize = f.length();
ProgressMonitor pm = pmis.getProgressMonitor();
pm.setMillisToDecideToPopup(0);
pm.setMillisToPopup(0);
// tell the progress bar that we start at the beginning of the stream
pm.setMinimum(0);
// tell the progress bar the total number of bytes we are going to read.
pm.setMaximum(downloadSize);
copyInputStreamToFile(pmis, new File("/tmp/b"));
}
内容来源于网络,如有侵权,请联系作者删除!