psmith      2003/09/02 22:47:27

  Modified:    src/java/org/apache/log4j/chainsaw ColorFilter.java
  Log:
  Forced to comment out some code here
  while we refactor the model.
  
  Colouring is broken until this is completed.
  
  The colour returned from this method is just
  the row stripe colour for the time being.
  
  Revision  Changes    Path
  1.2       +24 -19    
jakarta-log4j/src/java/org/apache/log4j/chainsaw/ColorFilter.java
  
  Index: ColorFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ColorFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ColorFilter.java  25 Jun 2003 04:05:21 -0000      1.1
  +++ ColorFilter.java  3 Sep 2003 05:47:27 -0000       1.2
  @@ -57,6 +57,8 @@
   import java.util.List;
   import java.util.Vector;
   
  +import org.apache.log4j.spi.LoggingEvent;
  +
   
   /**
    * If there are no filters defined, null is returned for color (the table 
background should then be used).
  @@ -147,26 +149,29 @@
   
     //relies on tostring correctly returning the string representation (either the 
row's value was
     //a string or row.get(i).tostring will return the data in a correct format - as 
in a date)
  -  public synchronized Color getColor(List columnNames, Vector row) {
  +  public synchronized Color getColor(List columnNames, LoggingEvent event) {
  +      
       Color color = null;
  -    Iterator iter = filters.iterator();
  -
  -    while (iter.hasNext()) {
  -      FilterEntry entry = (FilterEntry) iter.next();
  -      int colCount = columnNames.size();
  -
  -      for (int i = 0; i < colCount; i++) {
  -        if (row.get(i) == null) {
  -          //NOTE: level was in colnames but wasn't in vector 
  -          return null;
  -        }
  -
  -        if (
  -          entry.matches(columnNames.get(i).toString(), row.get(i).toString())) {
  -          return entry.getColor();
  -        }
  -      }
  -    }
  +    
  +//    TODO this is broken while the change from Vectors -> LoggingEvents occurs
  +//    Iterator iter = filters.iterator();
  +//
  +//    while (iter.hasNext()) {
  +//      FilterEntry entry = (FilterEntry) iter.next();
  +//      int colCount = columnNames.size();
  +//
  +//      for (int i = 0; i < colCount; i++) {
  +//        if (row.get(i) == null) {
  +//          //NOTE: level was in colnames but wasn't in vector 
  +//          return null;
  +//        }
  +//
  +//        if (
  +//          entry.matches(columnNames.get(i).toString(), row.get(i).toString())) {
  +//          return entry.getColor();
  +//        }
  +//      }
  +//    }
   
       return color;
     }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to