From e0302537bd687bab02f6174e66fd1d9c2f13ba9d Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 26 Mar 2008 12:00:42 +0000
Subject: [PATCH] Fix for issue 3064 (The setup command should check the Java version)

---
 opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupErrorPanel.java |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupErrorPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupErrorPanel.java
index 407e91c..7c331eb 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupErrorPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupErrorPanel.java
@@ -38,6 +38,7 @@
 import javax.swing.JPanel;
 import javax.swing.text.JTextComponent;
 
+import org.opends.messages.Message;
 import org.opends.quicksetup.ButtonName;
 import org.opends.quicksetup.CurrentInstallStatus;
 import org.opends.quicksetup.event.ButtonActionListener;
@@ -68,6 +69,18 @@
   public QuickSetupErrorPanel(GuiApplication application,
                               CurrentInstallStatus installStatus)
   {
+    this(application, installStatus.getInstallationMsg());
+    continueButton.setVisible(installStatus.canOverwriteCurrentInstall());
+  }
+
+  /**
+   * Constructor of the QuickSetupErrorPanel.
+   * @param application Application this panel represents
+   * @param msg the error message to display formatted in HTML.
+   */
+  public QuickSetupErrorPanel(GuiApplication application,
+                              Message msg)
+  {
     super(application);
     JPanel p1 = new JPanel(new GridBagLayout());
     p1.setBackground(UIFactory.CURRENT_STEP_PANEL_BACKGROUND);
@@ -83,8 +96,7 @@
     gbc.fill = GridBagConstraints.BOTH;
     gbc.insets.left = 0;
     JTextComponent tf =
-            UIFactory.makeHtmlPane(
-                    installStatus.getInstallationMsg(),
+            UIFactory.makeHtmlPane(msg,
                     UIFactory.INSTRUCTIONS_FONT);
     tf.setOpaque(false);
     tf.setEditable(false);
@@ -143,7 +155,7 @@
 
     gbc.gridwidth = GridBagConstraints.RELATIVE;
     p2.add(continueButton, gbc);
-    continueButton.setVisible(installStatus.canOverwriteCurrentInstall());
+    continueButton.setVisible(false);
 
     gbc.insets.left = UIFactory.HORIZONTAL_INSET_BETWEEN_BUTTONS;
     gbc.gridwidth = GridBagConstraints.REMAINDER;

--
Gitblit v1.10.0