From 52eb5a1049b7f97a9b207adddae8f0e58673fc46 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Tue, 18 Oct 2005 19:03:29 +0000 Subject: [PATCH] Added #isVisible and option to configure max number of rows to show in the table. SMACK-95 git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2976 b35dd754-fafc-0310-a699-88a17e54d16e --- .../smackx/debugger/EnhancedDebuggerWindow.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java b/source/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java index 87e5d7d56..9593ec9d5 100644 --- a/source/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java +++ b/source/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java @@ -52,6 +52,14 @@ public class EnhancedDebuggerWindow { private static ImageIcon connectionClosedOnErrorIcon; public static boolean PERSISTED_DEBUGGER = false; + /** + * Keeps the max number of rows to keep in the tables. A value less than 0 means that packets + * will never be removed. Since debuggers are meant to be used by developers the default is + * to keep all the information. However, if you are planning to use this debugger in a + * production environment then you should set a lower value (e.g. 50) to prevent the debugger + * from consuming all the JVM memory. + */ + public static int MAX_TABLE_ROWS = -1; { URL url; @@ -361,4 +369,10 @@ public class EnhancedDebuggerWindow { } } + public boolean isVisible() { + if (frame != null) { + return frame.isVisible(); + } + return false; + } }