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

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

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

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"));
  }

相关文章