logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psm...@apache.org
Subject cvs commit: jakarta-log4j/src/java/org/apache/log4j/chainsaw TableColorizingRenderer.java ChainsawConstants.java
Date Sat, 20 Dec 2003 04:51:52 GMT
psmith      2003/12/19 20:51:52

  Modified:    src/java/org/apache/log4j/chainsaw
                        TableColorizingRenderer.java ChainsawConstants.java
  Log:
  refactored some constants into the constants class.
  
  Revision  Changes    Path
  1.10      +2 -4      jakarta-log4j/src/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
  
  Index: TableColorizingRenderer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TableColorizingRenderer.java	9 Nov 2003 09:59:28 -0000	1.9
  +++ TableColorizingRenderer.java	20 Dec 2003 04:51:52 -0000	1.10
  @@ -90,8 +90,6 @@
     private static final Map iconMap =
       LevelIconFactory.getInstance().getLevelToIconMap();
     private Colorizer colorizer;
  -  private final Color background = new Color(255, 255, 254);
  -  private final Color COLOR_ODD = new Color(230, 230, 230);
     private final JLabel idComponent = new JLabel();
     private final JLabel levelComponent = new JLabel();
     private boolean levelUseIcons = true;
  @@ -230,9 +228,9 @@
          * Colourize based on row striping
          */
         if ((row % 2) != 0) {
  -        c.setBackground(COLOR_ODD);
  +        c.setBackground(ChainsawConstants.COLOR_ODD_ROW);
         } else {
  -        c.setBackground(background);
  +        c.setBackground(ChainsawConstants.COLOR_EVEN_ROW);
         }
       }
   
  
  
  
  1.7       +5 -0      jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawConstants.java
  
  Index: ChainsawConstants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawConstants.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ChainsawConstants.java	19 Dec 2003 06:50:57 -0000	1.6
  +++ ChainsawConstants.java	20 Dec 2003 04:51:52 -0000	1.7
  @@ -49,6 +49,7 @@
   
   package org.apache.log4j.chainsaw;
   
  +import java.awt.Color;
   import java.net.URL;
   
   /**
  @@ -62,6 +63,9 @@
   public class ChainsawConstants {
     private ChainsawConstants(){}
     
  +  public static final Color COLOR_ODD_ROW = new Color(230, 230, 230);
  +  public static final Color COLOR_EVEN_ROW = new Color(255,255,255);
  +  
     public static final URL WELCOME_URL = ChainsawConstants.class.getClassLoader().getResource(
     "org/apache/log4j/chainsaw/WelcomePanel.html");
     
  @@ -113,4 +117,5 @@
     static final String LEVEL_DISPLAY_TEXT = "text";  
   
     static final String DATETIME_FORMAT = "EEE MMM dd HH:mm:ss z yyyy";
  +
   }
  
  
  

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


Mime
View raw message