Methods Summary |
---|
public synchronized void | clearLogRecords()
//For JDK1.3
//((DefaultTableModel)getModel()).setRowCount(0);
// For JDK1.2.x
getFilteredLogTableModel().clear();
|
protected java.util.Vector | getColumnNameAndNumber()
Vector columnNameAndNumber = new Vector();
for (int i = 0; i < _colNames.length; i++) {
columnNameAndNumber.add(i, _colNames[i]);
}
return columnNameAndNumber;
|
public org.apache.log4j.lf5.util.DateFormatManager | getDateFormatManager()Get the DateFormatManager for formatting dates.
return _dateFormatManager;
|
public org.apache.log4j.lf5.viewer.FilteredLogTableModel | getFilteredLogTableModel()
return (FilteredLogTableModel) getModel();
|
protected void | init()
setRowHeight(_rowHeight);
setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
public void | setDateFormatManager(org.apache.log4j.lf5.util.DateFormatManager dfm)Set the date format manager for formatting dates.
_dateFormatManager = dfm;
|
public void | setDetailedView()
//TODO: Defineable Views.
TableColumnModel model = getColumnModel();
// Remove all the columns:
for (int f = 0; f < _numCols; f++) {
model.removeColumn(_tableColumns[f]);
}
// Add them back in the correct order:
for (int i = 0; i < _numCols; i++) {
model.addColumn(_tableColumns[i]);
}
//SWING BUG:
sizeColumnsToFit(-1);
|
public void | setFont(java.awt.Font font)
super.setFont(font);
Graphics g = this.getGraphics();
if (g != null) {
FontMetrics fm = g.getFontMetrics(font);
int height = fm.getHeight();
_rowHeight = height + height / 3;
setRowHeight(_rowHeight);
}
|
public void | setView(java.util.List columns)
TableColumnModel model = getColumnModel();
// Remove all the columns:
for (int f = 0; f < _numCols; f++) {
model.removeColumn(_tableColumns[f]);
}
Iterator selectedColumns = columns.iterator();
Vector columnNameAndNumber = getColumnNameAndNumber();
while (selectedColumns.hasNext()) {
// add the column to the view
model.addColumn(_tableColumns[columnNameAndNumber.indexOf(selectedColumns.next())]);
}
//SWING BUG:
sizeColumnsToFit(-1);
|