public void setStatus(String text) { if (text.length() > 25) { this.statusLabel.setText("Searching in file: ..." + text.substring(text.length() - 25)); } else { this.statusLabel.setText("Searching in file: " + text); } progressBar.setValue(progressBar.getValue() + 1); }
@Override public void addedFile(int fileCount, File file) { tokenizingFilesBar.setMaximum(fileCount); tokenizingFilesBar.setValue(tokenizingFilesBar.getValue() + 1); } // CPDListener
progress.setValue(progress.getValue() + 1); if (cancelled) { break;
int interProgress = progressBar.getValue(); int stepProgress = progressMax - interProgress; int progress = interProgress;
int interProgress = progressBar.getValue(); int stepProgress = progressMax - interProgress; int progress = interProgress;
/** * Increment the progress of the progress bar by a given number. * <p> * You should call {@link #displayInProgress(int)} first for useful semantics. * * @param size the size to increment by. */ public void incrementProgressBarBy(final int size) { if (progressBar.getValue() < progressBar.getMaximum()) { progressBar.setValue(progressBar.getValue() + size); } }
/** * Get the current progress amount from the progress bar. * * @return */ public int getValue() { return progressBar.getValue(); }
public void run() { int currentValue = currentProgressBar.getValue(); currentProgressBar.setValue(currentValue + 1); } }, true);
@Override public void loadedSheet (SampleSheet sampleSheet) { progressBar.setValue(progressBar.getValue() + 1); }
@Override public void addedFile(int fileCount, File file) { tokenizingFilesBar.setMaximum(fileCount); tokenizingFilesBar.setValue(tokenizingFilesBar.getValue() + 1); } // CPDListener
JProgressBar bar; Properties props1; int step; String sr; // (...) bar.setMaximum(5); // 5 = fully done // (...) step = bar.getValue(); sr = props1.getProperty("TP"+step+".SymbolRate");
@Override public void alignmentEnded() { alignmentsProcessed++; //System.out.println("aligned " + alignmentsProcessed ); int v = progressBar.getValue(); progressBar.setValue(v+1); progressBar.setString(String.valueOf(v)); synchronized(this){notifyAll();} }
public void run() { statusLabel.setText(statusText.toString()); progressBar.setValue(progressBar.getValue() + 1); if (finishedLoading()) { ProgressCallBackDialog.this.setVisible(false); return; } } });
public void run() { statusLabel.setText(statusText.toString()); setTaskStatus(null); progressBar.setValue(progressBar.getValue() + 1); if (finishedLoading()) { ProgressAbortDialog.this.setVisible(false); return; } } });
public void run() { statusLabel.setText(statusText.toString()); setTaskStatus(null); progressBar.setValue(progressBar.getValue() + 1); if (finishedLoading()) { ProgressAbortDialog.this.setVisible(false); return; } } });
@Override public void run () { int old = bar.getValue(); if (old > bar.getMinimum()) { int diff = bar.getMaximum() - old; int increment = (int) Math.round(diff * constants.ratio.getValue()); bar.setValue(old + increment); } } });
@RunsInEDT static int valueOf(final JProgressBar progressBar) { Integer result = execute(() -> progressBar.getValue()); return checkNotNull(result); }
@Override public void aborted() { if (!mShuttingDown && !mPaused) { PerformanceReportDialog perfReportDlg = new PerformanceReportDialog(CpmPanel.this .getParentFrame()); perfReportDlg.displayStats(mCPE.getPerformanceReport(), progressBar.getValue(), "Processing aborted."); } resetScreen(); mPaused = false; } }
public void run() { ByteFormat formatter = new ByteFormat(); long value = bar.getValue(); long average = value / seconds; String text = formatter.format(average) + "/Sec"; String total = formatter.format(value); titlePanel.setDescription(Res.getString("message.version", version.getVersion()) + " \n" + Res.getString("message.file.size", sizeText) + "\n" + Res.getString("message.transfer.rate") + ": " + text + "\n" + Res.getString("message.total.downloaded") + ": " + total); seconds++; } }, 1000, 1000);