From c40f084a6d3e897785f2fbff3ddb97545644cddc 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):

---
 opends/src/quicksetup/org/opends/quicksetup/ui/CurrentStepPanel.java |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/CurrentStepPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/CurrentStepPanel.java
index 906f4c3..9155a1e 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/CurrentStepPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/CurrentStepPanel.java
@@ -32,10 +32,13 @@
 
 import java.util.HashMap;
 
+import org.opends.quicksetup.CurrentInstallStatus;
 import org.opends.quicksetup.Step;
 import org.opends.quicksetup.installer.FieldName;
 import org.opends.quicksetup.installer.InstallProgressDescriptor;
 import org.opends.quicksetup.installer.UserInstallData;
+import org.opends.quicksetup.uninstaller.UninstallProgressDescriptor;
+import org.opends.quicksetup.util.Utils;
 
 /**
  * This is the class that contains the panel on the right-top part of the
@@ -54,6 +57,8 @@
 {
   private UserInstallData defaultUserData;
 
+  private CurrentInstallStatus installStatus;
+
   private static final long serialVersionUID = 5474803491510999334L;
 
   private HashMap<Step, QuickSetupStepPanel> hmPanels =
@@ -63,12 +68,14 @@
    * The constructor of this class.
    * @param defaultUserData the default data that is used to initialize the
    * contents of the panels (the proposed values).
+   * @param installStatus the object describing the current installation status.
    * @param isUninstall boolean telling whether we are uninstalling or not.
    */
   public CurrentStepPanel(UserInstallData defaultUserData,
-      boolean isUninstall)
+      CurrentInstallStatus installStatus, boolean isUninstall)
   {
     this.defaultUserData = defaultUserData;
+    this.installStatus = installStatus;
     createLayout(isUninstall);
   }
 
@@ -125,11 +132,12 @@
   {
     if (isUninstall)
     {
-      hmPanels.put(Step.CONFIRM_UNINSTALL, new ConfirmUninstallPanel());
+      hmPanels.put(Step.CONFIRM_UNINSTALL,
+          new ConfirmUninstallPanel(installStatus));
       hmPanels.put(Step.PROGRESS, new ProgressPanel());
     } else
     {
-      hmPanels.put(Step.WELCOME, new WelcomePanel());
+      hmPanels.put(Step.WELCOME, new InstallWelcomePanel());
       hmPanels.put(Step.SERVER_SETTINGS, new ServerSettingsPanel(
           defaultUserData));
       hmPanels.put(Step.DATA_OPTIONS,
@@ -149,7 +157,10 @@
     }
 
     // For aesthetical reasons we add a little bit of height
-    minHeight += UIFactory.EXTRA_DIALOG_HEIGHT;
+    if (!Utils.isUninstall())
+    {
+      minHeight += UIFactory.EXTRA_DIALOG_HEIGHT;
+    }
 
     setPreferredSize(new Dimension(minWidth, minHeight));
     setMinimumSize(new Dimension(minWidth, minHeight));
@@ -184,6 +195,19 @@
   }
 
   /**
+   * Forwards the different panels the UninstallProgressDescriptor so that they
+   * can update their contents accordingly.
+   * @param descriptor the descriptor of the Uninstallation progress.
+   */
+  public void displayProgress(UninstallProgressDescriptor descriptor)
+  {
+    for (Step s : hmPanels.keySet())
+    {
+      getPanel(s).displayProgress(descriptor);
+    }
+  }
+
+  /**
    * Retrieves the panel for the provided step.
    * @param step the step for which we want to get the panel.
    * @return the panel for the provided step.

--
Gitblit v1.10.0