logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r1026555 - /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
Date Sat, 23 Oct 2010 04:18:12 GMT
Author: sdeboy
Date: Sat Oct 23 04:18:10 2010
New Revision: 1026555

URL: http://svn.apache.org/viewvc?rev=1026555&view=rev
Log:
Table rendering update (font fix, label icon for 'basic' mode)

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=1026555&r1=1026554&r2=1026555&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 Oct 23 04:18:10 2010
@@ -197,6 +197,7 @@ public class TableColorizingRenderer ext
         return rendererComponent;
       }
       basicComponent = (JLabel)rendererComponent;
+      basicComponent.setFont(levelTextPane.getFont());
       setBasicComponentBorder(basicComponent, isSelected, table, col);
     }
     long delta = 0;
@@ -382,6 +383,23 @@ public class TableColorizingRenderer ext
         }
         textPaneContainer.add(textPane, BorderLayout.SOUTH);
 
+        if (delta == 0 || !logPanelPreferenceModel.isShowMillisDeltaAsGap()) {
+          if (col == 0) {
+            textPane.setBorder(getLeftBorder(isSelected, delta));
+          } else if (col == table.getColumnCount() - 1) {
+            textPane.setBorder(getRightBorder(isSelected, delta));
+          } else {
+            textPane.setBorder(getMiddleBorder(isSelected, delta));
+          }
+        } else {
+            if (col == 0) {
+              textPane.setBorder(getLeftBorder(isSelected, 0));
+            } else if (col == table.getColumnCount() - 1) {
+              textPane.setBorder(getRightBorder(isSelected, 0));
+            } else {
+              textPane.setBorder(getMiddleBorder(isSelected, 0));
+            }
+        }
         int currentMarkerHeight = loggingEventWrapper.getMarkerHeight();
         int currentMsgHeight = loggingEventWrapper.getMsgHeight();
         int newRowHeight = ChainsawConstants.DEFAULT_ROW_HEIGHT;
@@ -425,13 +443,13 @@ public class TableColorizingRenderer ext
         }
 
         component = textPaneContainer;
-        setComponentBorder(component, isSelected, table, col, delta);
       }
         break;
     case ChainsawColumns.INDEX_LEVEL_COL_NAME:
       if (levelUseIcons) {
         if (basic) {
           basicComponent.setText("");
+          basicComponent.setIcon((Icon)iconMap.get(value.toString()));
           if (!toolTipsVisible) {
             basicComponent.setToolTipText(value.toString());
           }
@@ -464,8 +482,6 @@ public class TableColorizingRenderer ext
         }
       }
       if (basic) {
-        basicComponent.setForeground(label.getForeground());
-        basicComponent.setBackground(label.getBackground());
         component = basicComponent;
       } else {
         levelTextPane.setForeground(label.getForeground());



Mime
View raw message