[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    Bugfix for LogFactor5 viewer.
From:       Stanislav Lyakhnovich <stas.lyahnovich () gmail ! com>
Date:       2008-12-29 9:55:13
Message-ID: 1230544513.2553.0.camel () cloud-work
[Download RAW message or body]

Hello!
I found a bug in LogFactor5 (log4j-1.2.15). In categories view some time
label becomes invisilbe. It occurs because of unchanged underlaing panel
size and layout. So every time node renders we need to update _panel
layout.
Patch attached.

["lf5tree.patch" (lf5tree.patch)]

--- CategoryNodeRenderer.java	2007-08-25 08:09:38.000000000 +0400
+++ /home/cloud/apps/apache-log4j-1.2.15/src/main/java/org/apache/log4j/lf5/viewer/categoryexplorer/CategoryNodeRenderer.java	2008-12-15 \
14:49:14.000000000 +0300 @@ -73,6 +73,7 @@
     // The flowlayout set to LEFT is very important so that the editor
     // doesn't jump around.
     _panel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
+    
     _panel.add(_checkBox);
     _panel.add(this);
 
@@ -98,7 +99,7 @@
     super.getTreeCellRendererComponent(
         tree, value, selected, expanded,
         leaf, row, hasFocus);
-
+        
     if (row == 0) {
       // Root row -- no check box
       _checkBox.setVisible(false);
@@ -115,6 +116,7 @@
       this.setForeground(Color.red);
     }
 
+	_panel.getLayout().layoutContainer(_panel);
     return _panel;
   }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic