From 9b9458d2f41ef81f68be193dc163dc140574219d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 9 Oct 2008 02:05:53 +0200 Subject: [PATCH] Add approximated insert speed to progress bar text. --- src/de/todesbaum/jsite/gui/ProjectInsertPage.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java index 7a3ccac..4024e7e 100644 --- a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java @@ -291,8 +291,10 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl int progress = (succeeded + failed + fatal) * 100 / total; StringBuilder progressString = new StringBuilder(); progressString.append(progress).append("% ("); - progressString.append(succeeded + failed + fatal).append("/").append(total); - progressString.append(")"); + progressString.append(succeeded + failed + fatal).append('/').append(total); + progressString.append(") ("); + progressString.append(formatNumber(total * 32.0 / ((System.currentTimeMillis() - startTime) / 1000), 1)); + progressString.append(' ').append(I18n.getMessage("jsite.insert.k-per-s")).append(')'); progressBar.setString(progressString.toString()); if (finalized) { progressBar.setFont(progressBar.getFont().deriveFont(Font.BOLD)); -- 2.7.4