psmith      2003/09/02 22:46:25

  Modified:    src/java/org/apache/log4j/chainsaw EventContainer.java
  Log:
  a refactor of the model interface has been completed
  to remove dependance on Vector, replaced with LoggingEvent.
  
  Also removed some methods from the interface, as there
  functionality is now supported by other helper methods/classes.
  
  In particular, the getDetailText method has been removed
  and replaced with standard Log4j layout methodology.
  
  Revision  Changes    Path
  1.4       +8 -10     
jakarta-log4j/src/java/org/apache/log4j/chainsaw/EventContainer.java
  
  Index: EventContainer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/EventContainer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EventContainer.java       1 Sep 2003 02:03:03 -0000       1.3
  +++ EventContainer.java       3 Sep 2003 05:46:25 -0000       1.4
  @@ -49,7 +49,9 @@
   
   package org.apache.log4j.chainsaw;
   
  -import java.util.Vector;
  +import java.util.List;
  +
  +import org.apache.log4j.spi.LoggingEvent;
   
   /**
    * To allow pluggable TableModel implementations for Chainsaw, this interface has 
been factored out.
  @@ -88,14 +90,14 @@
     int find(int startRow, String text);
   
     /**
  -   * Returns every event in the model.
  +   * Returns a copied list of all the event in the model.
      */
  -  Vector getAllEvents();
  +  List getAllEvents();
   
     /**
      * Returns the vector representing the row.
      */
  -  Vector getRow(int row);
  +  LoggingEvent getRow(int row);
   
     /**
      * Adds a row to the model.
  @@ -103,7 +105,7 @@
      * @param valueIsAdjusting
      * @return flag representing whether or not the row is being displayed (not 
filtered)
      */
  -  boolean isAddRow(Vector row, boolean valueIsAdjusting);
  +  boolean isAddRow(LoggingEvent e, boolean valueIsAdjusting);
   
     /**
      * Allow a forced notification of the EventCountListeners
  @@ -121,15 +123,11 @@
      * Returns the index of the row
      * @param row
      */
  -  int getRowIndex(Vector v);
  +  int getRowIndex(LoggingEvent e);
   
     /**
      * Causes the EventContainer to sort according to it's configured attributes
      */
     void sort();
   
  -  /**
  -   * Return the detail text - uses the selected columns defined in the display 
filter
  -   */
  -  String getDetailText(int selectedRow);
   }
  
  
  

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

Reply via email to