From 0d4fcc5d06ea453a4b6c4abdb9f17a854970db0b Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 08 May 2007 16:58:25 +0000
Subject: [PATCH] When the user provides authentication (and if previously not all the information was displayed) resize the dialog so that we actually can view all the status.
---
opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/StatusPanelDialog.java | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/StatusPanelDialog.java b/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/StatusPanelDialog.java
index edcf3eb..ee38635 100644
--- a/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/StatusPanelDialog.java
+++ b/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/StatusPanelDialog.java
@@ -85,6 +85,7 @@
private static final long serialVersionUID = 6832422469078074151L;
private ServerStatusDescriptor lastDescriptor;
+ private ServerStatusDescriptor lastPackDescriptor;
private HashSet<StatusPanelButtonListener> listeners =
new HashSet<StatusPanelButtonListener>();
@@ -174,6 +175,8 @@
}
Utils.centerOnScreen(this);
+ lastPackDescriptor = lastDescriptor;
+
setVisible(true);
}
@@ -204,6 +207,27 @@
updateDatabaseContents(desc);
updateErrorContents(desc);
+
+ boolean mustRepack;
+ if (lastPackDescriptor == null)
+ {
+ mustRepack = true;
+ }
+ else
+ {
+ boolean lastSmall =
+ (lastPackDescriptor.getListeners().size() == 0) &&
+ (lastPackDescriptor.getDatabases().size() == 0);
+ boolean currentBig =
+ (lastDescriptor.getListeners().size() > 0) ||
+ (lastDescriptor.getDatabases().size() > 0);
+ mustRepack = lastSmall && currentBig;
+ }
+ if (mustRepack)
+ {
+ pack();
+ lastPackDescriptor = lastDescriptor;
+ }
}
/**
--
Gitblit v1.10.0