From f10eeefc3ab93b6173fd4edbf196ca863344b4dc Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 11 Dec 2006 15:34:39 +0000
Subject: [PATCH] The following modifications include the comments from Neil and Brian (thanks to both for your help):
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/ProgressPanel.java | 44 +++++++++++++++++++++++++-------------------
1 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/ProgressPanel.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/ProgressPanel.java
index 71ece54..3bccf01 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/ProgressPanel.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/ProgressPanel.java
@@ -42,8 +42,8 @@
import org.opends.quicksetup.installer.InstallProgressDescriptor;
import org.opends.quicksetup.installer.InstallProgressStep;
-import org.opends.quicksetup.util.HtmlProgressMessageFormatter;
-import org.opends.quicksetup.util.ProgressMessageFormatter;
+import org.opends.quicksetup.uninstaller.UninstallProgressDescriptor;
+import org.opends.quicksetup.uninstaller.UninstallProgressStep;
/**
* This panel is used to show the progress of the install or the uninstall.
@@ -63,8 +63,6 @@
private String lastText;
- private ProgressMessageFormatter formatter;
-
/**
* ProgressPanel constructor.
*/
@@ -180,6 +178,29 @@
}
/**
+ * {@inheritDoc}
+ */
+ public void displayProgress(UninstallProgressDescriptor descriptor)
+ {
+ progressBarLabel.setText(UIFactory.applyFontToHtml(descriptor
+ .getProgressBarMsg(), UIFactory.PROGRESS_FONT));
+ UninstallProgressStep status = descriptor.getProgressStep();
+ if ((status == UninstallProgressStep.FINISHED_WITH_ERROR)
+ || (status == UninstallProgressStep.FINISHED_SUCCESSFULLY))
+ {
+ progressBar.setVisible(false);
+ }
+ int v = descriptor.getProgressBarRatio().intValue();
+ if (v > 0)
+ {
+ progressBar.setIndeterminate(false);
+ progressBar.setValue(v);
+ }
+ lastText = descriptor.getDetailsMsg();
+ detailsTextArea.setText(lastText);
+ }
+
+ /**
* Creates the progress bar panel.
* @return the created panel.
*/
@@ -212,19 +233,4 @@
return panel;
}
-
- /**
- * Returns the formatter that will be used to display the messages in this
- * panel.
- * @return the formatter that will be used to display the messages in this
- * panel.
- */
- ProgressMessageFormatter getFormatter()
- {
- if (formatter == null)
- {
- formatter = new HtmlProgressMessageFormatter();
- }
- return formatter;
- }
}
--
Gitblit v1.10.0