From aaee394b8c7fdcb653d09d35ea1a28e574632a22 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 08 May 2007 21:29:14 +0000
Subject: [PATCH] Do not display the replication monitoring information if there are no replicated suffixes.

---
 opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/DatabasesTableModel.java |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/DatabasesTableModel.java b/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/DatabasesTableModel.java
index 5ba295e..e17b884 100644
--- a/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/DatabasesTableModel.java
+++ b/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/DatabasesTableModel.java
@@ -61,6 +61,17 @@
   };
   private int sortColumn = 0;
   private boolean sortAscending = true;
+  private boolean displayReplicationInformation;
+
+  /**
+   * Constructor for this table model.
+   * @param displayReplicationInformation whether to display replication
+   * monitoring information or not.
+   */
+  public DatabasesTableModel(boolean displayReplicationInformation)
+  {
+    this.displayReplicationInformation = displayReplicationInformation;
+  }
 
   /**
    * Sets the data for this table model.
@@ -296,7 +307,7 @@
    */
   public int getColumnCount()
   {
-    return 6;
+    return displayReplicationInformation ? 6 : 4;
   }
 
   /**

--
Gitblit v1.10.0