+ final Progress mainProgress = new Progress(0, 80);
+ mainProgress.addProgressListener(new Progress.ProgressListener() {
+ private int current = mainProgress.getMin();
+
+ public void progress(Progress progress, String name) {
+ int diff = progress.getProgress() - current;
+ current += diff;
+
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < diff; i++) {
+ builder.append('.');
+ }
+
+ System.err.print(builder.toString());
+
+ if (progress.isDone()) {
+ System.err.println("");
+ }
+ }
+ });
+ Progress pg = new Progress();
+ mainProgress.addProgress(pg, mainProgress.getMax());
+