logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r935136 - /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
Date Sat, 17 Apr 2010 06:47:08 GMT
Author: sdeboy
Date: Sat Apr 17 06:47:07 2010
New Revision: 935136

URL: http://svn.apache.org/viewvc?rev=935136&view=rev
Log:
Fix visual glitch when rendering multi-line messages
 - only update row height if it has changed

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java?rev=935136&r1=935135&r2=935136&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
Sat Apr 17 06:47:07 2010
@@ -173,7 +173,13 @@ public class TableColorizingRenderer ext
         msgRenderer.setText(value.toString());
         if (wrapMsg) {
             int preferredHeight = (int) msgRenderer.getPreferredSize().getHeight();
-            int tableRowHeight = table.getRowHeight();
+            int tableRowHeight;
+            //row zero doesn't report its row height correctly..use default for row zero
+            if (row == 0) {
+                tableRowHeight = table.getRowHeight();
+            } else {
+                tableRowHeight = table.getRowHeight(row);
+            }
             if(preferredHeight != tableRowHeight) {
                 int rowHeight = Math.max(preferredHeight, tableRowHeight);
                 table.setRowHeight(row, rowHeight);



Mime
View raw message