psmith 2003/06/24 16:21:05
Modified: src/java/org/apache/log4j/chainsaw
ChainsawCyclicBufferTableModel.java
Log:
Fixed bug where when Cyclic buffer is used, only row inserted
events where being fired. WHen the buffer is full, this caused
Chainsaw to only update a single row, leaving all the old events "displayed".
This is more of a GUI repaint issue.
Took the approach that if the model is not cyclic, insert events are fine,
however if the model is cyclic, and model is full, then we need to revert
to table data change events, because the table needs to know potentially
all rows have moved.
Revision Changes Path
1.18 +10 -1
jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
Index: ChainsawCyclicBufferTableModel.java
===================================================================
RCS file:
/home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ChainsawCyclicBufferTableModel.java 24 Jun 2003 22:32:52 -0000 1.17
+++ ChainsawCyclicBufferTableModel.java 24 Jun 2003 23:21:05 -0000 1.18
@@ -538,7 +538,16 @@
int newRow = filteredList.indexOf(row);
- fireTableRowsInserted(newRow, newRow);
+ if(!isCyclic()) {
+ fireTableRowsInserted(newRow, newRow);
+ } else {
+ if(unfilteredList.size()==((CyclicBufferList)unfilteredList).getMaxSize()){
+ fireTableDataChanged();
+ } else {
+ fireTableRowsInserted(newRow, newRow);
+ }
+ }
+
return rowAdded;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]