public boolean notifyProgress(int value, int maximum) { this.progress = (double) value / (double) maximum; this.value = value; this.maximum = maximum; this.printProgressBar(); return true; }
public boolean notifyIndeterminantProgress() { this.progress = Double.NaN; this.value = 0; this.maximum = 0; this.printProgressBar(); return true; }
public boolean notifyProgress(double progress) { this.value = 0; this.maximum = 0; this.progress = progress; this.printProgressBar(); return true; }
public void notifyStatusChanged(String status) { /* If the new status message is shorter than the previous one, then * first change the status message all spaces to clear out the previous * message. */ if (status.length() < this.status.length()) { this.status = this.status.replaceAll(".", " "); this.printProgressBar(); } this.status = status; this.printProgressBar(); }