You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ps...@apache.org on 2003/05/26 01:31:59 UTC
cvs commit: jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw SortExecutor.java AbstractChainsawTableModel.java FilterChangeExecutor.java ChainsawCyclicBufferTableModel.java LogUI.java DefaultSortTableModel.java EventContainer.java
psmith 2003/05/25 16:31:59
Modified: src/java/org/apache/log4j/chainsaw LogUI.java
DefaultSortTableModel.java EventContainer.java
Added: src/java/org/apache/log4j/chainsaw SortExecutor.java
AbstractChainsawTableModel.java
FilterChangeExecutor.java
ChainsawCyclicBufferTableModel.java
Log:
More refactoring of DefaultSortableTableModel.
Moved out some static inner classes to top level classes so they can
be shared with other implementations of EventContainer.
Added an AbstractChainsawTableModel plus a shell impl of
ChainsawCyclicBufferTableModel.
Have tested a bit that this hasn't broken anything by loading events
from an XML file, and doing some basic filtering etc, and it seems
to be ok, but keep an eye out...
Revision Changes Path
1.78 +1 -1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java
Index: LogUI.java
===================================================================
RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- LogUI.java 23 May 2003 04:50:48 -0000 1.77
+++ LogUI.java 25 May 2003 23:31:59 -0000 1.78
@@ -1556,7 +1556,7 @@
}
void clearModel() {
- tableModel.clear();
+ tableModel.clearModel();
synchronized (detail) {
detailThread.setSelectedRow(-1);
1.14 +29 -109 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/DefaultSortTableModel.java
Index: DefaultSortTableModel.java
===================================================================
RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/DefaultSortTableModel.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- DefaultSortTableModel.java 23 May 2003 04:29:30 -0000 1.13
+++ DefaultSortTableModel.java 25 May 2003 23:31:59 -0000 1.14
@@ -76,6 +76,10 @@
* A sortable TableModel implementation
*
* Created by Claude Duguay
+ * Modifications by:
+ * * Scott Deboy <sd...@apache.org>
+ * * Paul Smith <ps...@apache.org>
+ *
* Copyright (c) 2002
*/
public class DefaultSortTableModel extends DefaultTableModel
@@ -88,54 +92,19 @@
private DisplayFilter displayFilter;
//a map of events keyed on ID (order received)
- private HashMap unfilteredEvents = new HashMap();
+ private Map unfilteredEvents = new HashMap();
private Vector allColumnNames;
private Vector detailColumns;
- private final FilterChangeExecutor filterExecutor =
- new FilterChangeExecutor();
+ private final FilterChangeExecutor filterExecutor;
private Vector countListeners = new Vector();
private StringBuffer detail = null;
private String eventType;
- public DefaultSortTableModel() {
- }
-
- public DefaultSortTableModel(Vector names, int rows, String eventType) {
- super(names, rows);
- this.eventType = eventType;
- allColumnNames = names;
- }
-
public DefaultSortTableModel(Vector data, Vector names, String eventType) {
super(data, names);
this.eventType = eventType;
allColumnNames = names;
- }
-
- public DefaultSortTableModel(int rows, int cols, String eventType) {
- super(rows, cols);
- this.eventType = eventType;
- }
-
- public DefaultSortTableModel(
- Object[][] data, Object[] names, String eventType) {
- super(data, names);
- this.eventType = eventType;
- allColumnNames = new Vector();
-
- for (int i = 0; i < names.length; i++) {
- allColumnNames.add(names[i]);
- }
- }
-
- public DefaultSortTableModel(Object[] names, int rows, String eventType) {
- super(names, rows);
- this.eventType = eventType;
- allColumnNames = new Vector();
-
- for (int i = 0; i < names.length; i++) {
- allColumnNames.add(names[i]);
- }
+ filterExecutor = new FilterChangeExecutor(this, getDataVector());
}
public void setDisplayFilter(DisplayFilter displayFilter) {
@@ -293,7 +262,7 @@
}
}
- public void clear() {
+ public void clearModel() {
synchronized (getDataVector()) {
super.setNumRows(0);
unfilteredEvents.clear();
@@ -551,7 +520,11 @@
return true;
}
- private void sort() {
+ public boolean isSortEnabled() {
+ return sortEnabled;
+ }
+
+ public void sort() {
synchronized (getDataVector()) {
Collections.sort(
getDataVector(),
@@ -564,7 +537,7 @@
public void sortColumn(
JSortTable table, int col, int currentRow, boolean ascending) {
SwingUtilities.invokeLater(
- new SortExecutor(table, col, currentRow, ascending));
+ new SortExecutor(this, this, table, col, currentRow, ascending));
}
/**
@@ -614,79 +587,26 @@
return buf.toString();
}
- class FilterChangeExecutor implements Runnable {
- public void run() {
- synchronized (getDataVector()) {
- Vector v = getDataVector();
- v.clear();
-
- Vector v2 = null;
- Map.Entry m = null;
- Vector v3 = null;
- Iterator iter = unfilteredEvents.entrySet().iterator();
-
- while (iter.hasNext()) {
- m = (Map.Entry) iter.next();
- v2 = (Vector) m.getValue();
-
- if (displayFilter != null) {
- v3 = displayFilter.filterColumns(v2);
-
- if (displayFilter.isDisplayed(v2)) {
- DefaultSortTableModel.super.addRow(v3);
- }
- }
- }
-
- if (sortEnabled) {
- sort();
- }
- }
+ public DisplayFilter getDisplayFilter() {
+ return displayFilter;
+ }
- notifyCountListeners();
- }
+ public Map getUnfilteredEvents() {
+ return unfilteredEvents;
}
- /**
- * A Runnable task that is executed in the Swing Event Dispatching
- * thread to ensure that the data is sorted by a particular column
- */
- class SortExecutor implements Runnable {
- private int col;
- private int currentRow;
- private boolean ascending;
- private JSortTable table;
-
- public SortExecutor(
- JSortTable table, int col, int currentRow, boolean ascending) {
- this.table = table;
- this.col = col;
- this.currentRow = currentRow;
- this.ascending = ascending;
- }
-
- public void run() {
- synchronized (getDataVector()) {
- Vector v = null;
+ public void setSortEnabled(boolean sortEnabled) {
+ this.sortEnabled = sortEnabled;
+ }
- if ((currentRow > -1) && (currentRow < getDataVector().size())) {
- v = (Vector) getDataVector().get(currentRow);
- }
+ public void setCurrentSortColumn(int col, boolean ascending) {
+ currentSortColumn = col;
+ currentSortAscending = ascending;
+ }
- sortEnabled = true;
- currentSortColumn = col;
- currentSortAscending = ascending;
- sort();
-
- if (v == null) {
- table.scrollToRow(
- -1, table.columnAtPoint(table.getVisibleRect().getLocation()));
- } else {
- table.scrollToRow(
- getDataVector().indexOf(v),
- table.columnAtPoint(table.getVisibleRect().getLocation()));
- }
- }
+ public void clearFilteredEvents() {
+ synchronized (getDataVector()) {
+ getDataVector().clear();
}
}
}
1.2 +50 -1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/EventContainer.java
Index: EventContainer.java
===================================================================
RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/EventContainer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EventContainer.java 23 May 2003 03:06:52 -0000 1.1
+++ EventContainer.java 25 May 2003 23:31:59 -0000 1.2
@@ -51,6 +51,7 @@
import org.apache.log4j.spi.LoggingEvent;
+import java.util.Map;
import java.util.Vector;
import javax.swing.table.TableModel;
@@ -78,6 +79,18 @@
public Vector getDisplayableEvents();
/**
+ * Returns true if Sorting is active/enabled
+ * @return
+ */
+ public boolean isSortEnabled();
+
+ /**
+ * Causes the EventContainer to sort according to it's configured attributes
+ *
+ */
+ public void sort();
+
+ /**
* returns every single event in the model
* @return
*/
@@ -94,7 +107,13 @@
* Clears the model completely
*
*/
- public void clear();
+ public void clearModel();
+
+ /**
+ * Clears the events that are currently being displayed
+ *
+ */
+ public void clearFilteredEvents();
/**
* Adds an EventCountListener, to be notified when the # of events changes
@@ -118,6 +137,12 @@
public boolean isAddRow(Vector row, boolean valueIsAdjusting);
/**
+ * Adds a row to the model
+ * @param row
+ */
+ public void addRow(Vector row);
+
+ /**
* Sets the DisplayFilter in operation
* @param displayFilter
*/
@@ -131,4 +156,28 @@
* @return
*/
public int find(int startRow, String text);
+
+ /**
+ * Returns the currently in use DisplayFilter
+ */
+ public DisplayFilter getDisplayFilter();
+
+ /**
+ * Returns a map of Unfiltered events
+ */
+ public Map getUnfilteredEvents();
+
+ /**
+ * Sets whether sorting is active/enabled
+ * @param b
+ */
+ public void setSortEnabled(boolean b);
+
+ /**
+ * Confitures the column index to sort on, and whether it's
+ * ascending or descending
+ * @param col
+ * @param ascending
+ */
+ public void setCurrentSortColumn(int col, boolean ascending);
}
1.1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/SortExecutor.java
Index: SortExecutor.java
===================================================================
/*
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
*
* Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
*
* 4. The names "log4j" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation. For more information on the
* Apache Software Foundation, please see <http://www.apache.org/>.
*
*/
package org.apache.log4j.chainsaw;
import java.util.Vector;
/**
* A Runnable task that is executed in the Swing Event Dispatching
* thread to ensure that the data is sorted by a particular column
*/
class SortExecutor implements Runnable {
private final EventContainer model;
private int col;
private int currentRow;
private boolean ascending;
private JSortTable table;
private final Object syncLock;
public SortExecutor(
EventContainer model, final Object syncLock, JSortTable table, int col,
int currentRow, boolean ascending) {
this.table = table;
this.model = model;
this.col = col;
this.currentRow = currentRow;
this.ascending = ascending;
this.syncLock = syncLock;
}
public void run() {
synchronized (syncLock) {
Vector v = null;
if ((currentRow > -1) && (currentRow < model.getAllEvents().size())) {
v = (Vector) model.getAllEvents().get(currentRow);
}
model.setSortEnabled(true);
model.setCurrentSortColumn(col, ascending);
model.sort();
if (v == null) {
table.scrollToRow(
-1, table.columnAtPoint(table.getVisibleRect().getLocation()));
} else {
table.scrollToRow(
model.getAllEvents().indexOf(v),
table.columnAtPoint(table.getVisibleRect().getLocation()));
}
}
}
}
1.1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/AbstractChainsawTableModel.java
Index: AbstractChainsawTableModel.java
===================================================================
/*
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
*
* Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
*
* 4. The names "log4j" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation. For more information on the
* Apache Software Foundation, please see <http://www.apache.org/>.
*
*/
package org.apache.log4j.chainsaw;
import java.util.HashMap;
import java.util.Map;
import java.util.Vector;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;
/**
* @author Paul Smith <ps...@apache.org>
*
*/
abstract class AbstractChainsawTableModel extends AbstractTableModel
implements EventContainer {
private boolean currentSortAscending;
private int currentSortColumn;
private boolean sortEnabled;
private DisplayFilter displayFilter;
private Vector countListeners = new Vector();
private final Object syncLock = new Object();
private final FilterChangeExecutor filterExecutor =
new FilterChangeExecutor(this, syncLock);
private Map unfilteredEvents = new HashMap();
/** The <code>Vector</code> of column identifiers. */
protected Vector columnIdentifiers;
public void addEventCountListener(EventCountListener listener) {
countListeners.add(listener);
}
public void notifyCountListeners() {
for (int i = 0; i < countListeners.size(); i++) {
((EventCountListener) countListeners.get(i)).eventCountChanged(
getRowCount(), getUnfilteredRowCount());
}
}
public void setDisplayFilter(DisplayFilter displayFilter) {
this.displayFilter = displayFilter;
}
public void filterChanged() {
// TODO do we need reset the tableModel with displayed columns if they are part of the filter?
// if (!displayFilter.getDisplayedColumns().equals(columnIdentifiers)) {
// setColumnIdentifiers(displayFilter.getDisplayedColumns());
// }
Vector detailColumns = displayFilter.getDetailColumns();
SwingUtilities.invokeLater(filterExecutor);
}
public void setSortEnabled(boolean sortEnabled) {
this.sortEnabled = sortEnabled;
}
public void setCurrentSortColumn(int col, boolean ascending) {
currentSortColumn = col;
currentSortAscending = ascending;
}
}
1.1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/FilterChangeExecutor.java
Index: FilterChangeExecutor.java
===================================================================
/*
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
*
* Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
*
* 4. The names "log4j" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation. For more information on the
* Apache Software Foundation, please see <http://www.apache.org/>.
*
*/
package org.apache.log4j.chainsaw;
import java.util.Iterator;
import java.util.Map;
import java.util.Vector;
class FilterChangeExecutor implements Runnable {
private final EventContainer model;
private final Object syncLock;
/**
* @param DefaultSortTableModel
*/
FilterChangeExecutor(EventContainer model, final Object syncLock) {
this.model = model;
this.syncLock = syncLock;
}
public void run() {
synchronized (syncLock) {
model.clearFilteredEvents();
Vector v2 = null;
Map.Entry m = null;
Vector v3 = null;
Iterator iter = this.model.getUnfilteredEvents().entrySet().iterator();
while (iter.hasNext()) {
m = (Map.Entry) iter.next();
v2 = (Vector) m.getValue();
if (model.getDisplayFilter() != null) {
v3 = model.getDisplayFilter().filterColumns(v2);
if (this.model.getDisplayFilter().isDisplayed(v2)) {
model.addRow(v3);
}
}
}
if (model.isSortEnabled()) {
model.sort();
}
}
model.notifyCountListeners();
}
}
1.1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
Index: ChainsawCyclicBufferTableModel.java
===================================================================
/*
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
*
* Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
*
* 4. The names "log4j" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation. For more information on the
* Apache Software Foundation, please see <http://www.apache.org/>.
*
*/
package org.apache.log4j.chainsaw;
import org.apache.log4j.spi.LoggingEvent;
import java.util.Map;
import java.util.Vector;
import javax.swing.table.AbstractTableModel;
/**
* A CyclicBuffer implementation of the EventContainer.
*
* @author Paul Smith <ps...@apache.org>
*
*/
class ChainsawCyclicBufferTableModel extends AbstractChainsawTableModel
implements EventContainer {
/* (non-Javadoc)
* @see javax.swing.table.TableModel#getValueAt(int, int)
*/
public Object getValueAt(int arg0, int arg1) {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see javax.swing.table.TableModel#getColumnCount()
*/
public int getColumnCount() {
// TODO Auto-generated method stub
return 0;
}
/* (non-Javadoc)
* @see javax.swing.table.TableModel#getRowCount()
*/
public int getRowCount() {
// TODO Auto-generated method stub
return 0;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#getUnfilteredRowCount()
*/
public int getUnfilteredRowCount() {
// TODO Auto-generated method stub
return 0;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#getDisplayableEvents()
*/
public Vector getDisplayableEvents() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#getAllEvents()
*/
public Vector getAllEvents() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#getEvent(java.lang.Integer)
*/
public LoggingEvent getEvent(Integer ID) {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#clear()
*/
public void clearModel() {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#isAddRow(java.util.Vector, boolean)
*/
public boolean isAddRow(Vector row, boolean valueIsAdjusting) {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#find(int, java.lang.String)
*/
public int find(int startRow, String text) {
// TODO Auto-generated method stub
return 0;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.SortTableModel#isSortable(int)
*/
public boolean isSortable(int col) {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.SortTableModel#sortColumn(org.apache.log4j.chainsaw.JSortTable, int, int, boolean)
*/
public void sortColumn(
JSortTable table, int col, int row, boolean ascending) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#isSortEnabled()
*/
public boolean isSortEnabled() {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#sort()
*/
public void sort() {
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#addRow(java.util.Vector)
*/
public void addRow(Vector row) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#getDisplayFilter()
*/
public DisplayFilter getDisplayFilter() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#getUnfilteredEvents()
*/
public Map getUnfilteredEvents() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.log4j.chainsaw.EventContainer#clearFilteredEvents()
*/
public void clearFilteredEvents() {
// TODO Auto-generated method stub
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org