From d441f750a60beeafecb7795c59ca73927cbc8ea7 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 16 Oct 2009 00:27:26 +0000
Subject: [PATCH] Change the interface of ProgressDialog to be able to specify separately the frame of the dialog and the component that must be used as a reference to display the dialog.
---
opends/src/guitools/org/opends/guitools/controlpanel/ui/ProgressDialog.java | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/ProgressDialog.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/ProgressDialog.java
index 419ab9d..bdb8bd7 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/ProgressDialog.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/ProgressDialog.java
@@ -44,6 +44,7 @@
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JEditorPane;
+import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JScrollPane;
@@ -69,15 +70,17 @@
/**
* Constructor of the dialog.
- * @param parentDialog the parent dialog.
+ * @param parentFrame the parent frame.
+ * @param relativeTo the component to use as reference to set the position
+ * of this dialog.
* @param title the title of the dialog.
* @param info the control panel information.
*/
- public ProgressDialog(Component parentDialog, Message title,
- ControlPanelInfo info)
+ public ProgressDialog(JFrame parentFrame, Component relativeTo,
+ Message title, ControlPanelInfo info)
{
- super(Utilities.getFrame(parentDialog), getPanel(info));
- Utilities.centerGoldenMean(this, parentDialog);
+ super(parentFrame, getPanel(info));
+ Utilities.centerGoldenMean(this, relativeTo);
setTitle(title.toString());
progressPanel = (ProgressPanel)panel;
getRootPane().setDefaultButton(progressPanel.closeButton);
--
Gitblit v1.10.0