From c093f1a074d234d120e7d4f80e9f4e59512f9f04 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 30 Jul 2009 15:10:51 +0000
Subject: [PATCH] Fix for issue 4159 ('?' sign in Base DNs table should display the tooltip when clicking on it) Create a new listener that will be in charge of displaying the tool tip when the user clicks on the component that registered it as listener.

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java
index 09e1ea8..d91560b 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java
@@ -760,6 +760,7 @@
     connectionHandlersTable =
       Utilities.createSortableTable(connectionHandlerTableModel,
         new CustomCellRenderer());
+    connectionHandlersTable.setCellSelectionEnabled(false);
 
     gbc.insets.top = 5;
     p.add(connectionHandlersTable.getTableHeader(), gbc);
@@ -797,14 +798,19 @@
 
     dbTableModelWithReplication = new BaseDNTableModel(true);
     dbTableModelWithoutReplication = new BaseDNTableModel(false);
+    BaseDNCellRenderer renderer = new BaseDNCellRenderer();
     noReplicatedBaseDNsTable =
       Utilities.createSortableTable(dbTableModelWithoutReplication,
-        new BaseDNCellRenderer());
+        renderer);
     noReplicatedBaseDNsTable.setVisible(false);
     noReplicatedBaseDNsTable.getTableHeader().setVisible(false);
     replicationBaseDNsTable =
       Utilities.createSortableTable(dbTableModelWithReplication,
-        new BaseDNCellRenderer());
+        renderer);
+    noReplicatedBaseDNsTable.setCellSelectionEnabled(false);
+    replicationBaseDNsTable.setCellSelectionEnabled(false);
+    Utilities.addClickTooltipListener(noReplicatedBaseDNsTable);
+    Utilities.addClickTooltipListener(replicationBaseDNsTable);
 
     gbc.insets.top = 5;
     p.add(noReplicatedBaseDNsTable.getTableHeader(), gbc);
@@ -882,4 +888,3 @@
     return status.toString();
   }
 }
-

--
Gitblit v1.10.0