From 2b1318754b3613c413c72b192ff47ba6bfb55d31 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 24 May 2007 00:37:30 +0000
Subject: [PATCH] This commit addresses issue 1599 as well as introduces some other changes suggested by Brian after reviewing the SWAED guidelines:

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java |   52 +++++++++++++++++++++-------------------------------
 1 files changed, 21 insertions(+), 31 deletions(-)

diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
index 1a0c203..e3f15d4 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
@@ -140,6 +140,19 @@
   }
 
   /**
+   * Called before the application cancels its operation, giving the
+   * user a chance to confirm the cancellation action.
+   * @param qs QuickSetup that can be used for confirming
+   * @return boolean where true indicates that the user answered
+   * affirmatively to the cancelation confirmation
+   */
+  public boolean confirmCancel(QuickSetup qs) {
+    return qs.displayConfirmation(
+          getMsg("confirm-cancel-prompt"),
+          getMsg("confirm-cancel-title"));
+  }
+
+  /**
    * Get the name of the button that will receive initial focus.
    * @return ButtonName of the button to receive initial focus
    */
@@ -184,6 +197,14 @@
   abstract public WizardStep getPreviousWizardStep(WizardStep step);
 
   /**
+   * Gets the currently displayed wizard step.
+   * @return WizardStep being displayed.
+   */
+  public WizardStep getCurrentWizardStep() {
+    return displayedStep;
+  }
+
+  /**
    * Indicates whether or not the provided <code>step</code> is a sub step or
    * not.
    * @param step WizardStep for which the return value indicates whether
@@ -276,28 +297,6 @@
   }
 
   /**
-   * Inidicates whether or not the user is allowed to close the wizard from
-   * <code>step</code>.
-   * @param step WizardStep for which the the return value indicates whether
-   * or not the user can close the wizard
-   * @return boolean where true indicates the user can close the wizard
-   */
-  public boolean canClose(WizardStep step) {
-    return false;
-  }
-
-  /**
-   * Inidicates whether or not the user is allowed to cancel the wizard from
-   * <code>step</code>.
-   * @param step WizardStep for which the the return value indicates whether
-   * or not the user can cancel the wizard
-   * @return boolean where true indicates the user can cancel the wizard
-   */
-  public boolean canCancel(WizardStep step) {
-    return false;
-  }
-
-  /**
    * Called when the user has clicked the 'previous' button.
    * @param cStep WizardStep at which the user clicked the previous button
    * @param qs QuickSetup controller
@@ -333,15 +332,6 @@
   }
 
   /**
-   * Called when the user has clicked the 'cancel' button.
-   * @param cStep WizardStep at which the user clicked the cancel button
-   * @param qs QuickSetup controller
-   */
-  public void cancelClicked(WizardStep cStep, QuickSetup qs) {
-    qs.quit();
-  }
-
-  /**
    * Called when the user has clicked the 'quit' button.
    * @param step WizardStep at which the user clicked the quit button
    * @param qs QuickSetup controller

--
Gitblit v1.10.0