From c96108b4530dde68a2613fd3f190c5b6cf9f37aa Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 04 Jan 2010 11:09:59 +0000
Subject: [PATCH] Fix for issue 4415 (Control panel connection chooser doesn't show in task bar) Use a JFrame instead of a JDialog for the initial login dialog.
---
opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 56 insertions(+), 1 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
index 45e7016..8757afc 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2009 Sun Microsystems, Inc.
+ * Copyright 2009-2010 Sun Microsystems, Inc.
*/
package org.opends.guitools.controlpanel.ui;
@@ -134,6 +134,61 @@
}
/**
+ * Returns the displayed host name.
+ * @return the displayed host name.
+ */
+ public String getHostName()
+ {
+ return hostName.getText();
+ }
+
+ /**
+ * Returns the displayed administration port.
+ * @return the displayed administration port.
+ */
+ public int getPort()
+ {
+ int port = -1;
+ try
+ {
+ port = new Integer(this.port.getText().trim());
+ }
+ catch (Exception ex)
+ {
+ // Ignore
+ }
+ return port;
+ }
+
+ /**
+ * Returns the displayed bind DN.
+ * @return the displayed bind DN.
+ */
+ public String getBindDN()
+ {
+ return dn.getText();
+ }
+
+ /**
+ * Returns the displayed password.
+ * @return the displayed password.
+ */
+ public char[] getBindPassword()
+ {
+ return pwd.getPassword();
+ }
+
+ /**
+ * Returns whether the panel displays the remote or the local server.
+ * @return whether the panel displays the remote or the local server.
+ */
+ public boolean isRemote()
+ {
+ int index = combo.getSelectedIndex();
+ return index == 1;
+ }
+
+ /**
* Sets the displayed host name.
* @param hostName the host name.
*/
--
Gitblit v1.10.0