FileDocCategorySizeDatePackage
LogTableRowRenderer.javaAPI DocApache log4j 1.2.153611Sat Aug 25 00:09:38 BST 2007org.apache.log4j.lf5.viewer

LogTableRowRenderer

public class LogTableRowRenderer extends DefaultTableCellRenderer
LogTableRowRenderer
author
Michael J. Sikorsky
author
Robert Shaw
author
Brad Marlborough

Fields Summary
private static final long
serialVersionUID
protected boolean
_highlightFatal
protected Color
_color
Constructors Summary
Methods Summary
protected java.awt.ColorgetLogLevelColor(org.apache.log4j.lf5.LogLevel level)

    return (Color) LogLevel.getLogLevelColorMap().get(level);
  
public java.awt.ComponentgetTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int col)


  //--------------------------------------------------------------------------
  //   Private Variables:
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  //   Constructors:
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  //   Public Methods:
  //--------------------------------------------------------------------------

     
       
       
       
       
        

    if ((row % 2) == 0) {
      setBackground(_color);
    } else {
      setBackground(Color.white);
    }

    FilteredLogTableModel model = (FilteredLogTableModel) table.getModel();
    LogRecord record = model.getFilteredRecord(row);

    setForeground(getLogLevelColor(record.getLevel()));

    return (super.getTableCellRendererComponent(table,
        value,
        isSelected,
        hasFocus,
        row, col));