@Override public void remaining(int remainingWork) { if (change(progressBar.getMaximum() - remainingWork)) { progressBar.setValue(progressBar.getMaximum() - remainingWork); updateMessage(); } deltaWork = progressBar.getMaximum() - remainingWork - this.progressBar.getValue(); }
@Override public void progress(int deltaWork) { this.deltaWork += deltaWork; if (change(progressBar.getValue() + this.deltaWork)) { progressBar.setValue(progressBar.getValue() + this.deltaWork); this.deltaWork = 0; updateMessage(); } }