logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r935151 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: ChainsawConstants.java LogPanel.java TableColorizingRenderer.java
Date Sat, 17 Apr 2010 08:48:42 GMT
Author: sdeboy
Date: Sat Apr 17 08:48:41 2010
New Revision: 935151

URL: http://svn.apache.org/viewvc?rev=935151&view=rev
Log:
More visual glitch fixes when rendering multi-line messages
- fixing line resizing - still a repaint flicker, but lines stay the same size

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

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java?rev=935151&r1=935150&r2=935151&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java
Sat Apr 17 08:48:41 2010
@@ -35,6 +35,7 @@ public class ChainsawConstants {
   public static final Color COLOR_DEFAULT_BACKGROUND = new Color(255,255,255);
   public static final Color COLOR_DEFAULT_FOREGROUND = Color.BLACK;
 
+  public static final int DEFAULT_ROW_HEIGHT = 20;
   public static final Color FIND_LOGGER_BACKGROUND = new Color(40, 40, 40);
   public static final Color FIND_LOGGER_FOREGROUND = Color.WHITE;
 

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java?rev=935151&r1=935150&r2=935151&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java Sat Apr 17
08:48:41 2010
@@ -704,7 +704,7 @@ public class LogPanel extends DockablePa
     /*
      * Table definition.  Actual construction is above (next to tablemodel)
      */
-    table.setRowHeight(20);
+    table.setRowHeight(ChainsawConstants.DEFAULT_ROW_HEIGHT);
     table.setRowMargin(0);
     table.getColumnModel().setColumnMargin(0);
     table.setShowGrid(false);

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=935151&r1=935150&r2=935151&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 08:48:41 2010
@@ -174,15 +174,9 @@ public class TableColorizingRenderer ext
         if (wrapMsg) {
             int preferredHeight = (int) msgRenderer.getPreferredSize().getHeight();
             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);
+            tableRowHeight = table.getRowHeight(row);
+            if(preferredHeight != tableRowHeight && preferredHeight != ChainsawConstants.DEFAULT_ROW_HEIGHT)
{
+                table.setRowHeight(row, preferredHeight);
             }
         }
     break;



Mime
View raw message