simtools.logging.ui
Class AbstractLoggingTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by simtools.logging.ui.AbstractLoggingTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Direct Known Subclasses:
LoggingBufferTableModel, LoggingTableModel

public abstract class AbstractLoggingTableModel
extends javax.swing.table.AbstractTableModel

See Also:
Serialized Form

Field Summary
protected static int LEVEL_SCALE_FACTOR
          (int) LEVEL_SCALE_FACTOR: the scale factor to be used, not to represent all the levels.
protected static java.lang.String[] levelNames
          (String[]) levelNames: The correspondance between log level and string representation.
protected  MenuResourceBundle menuResources
          menu resources
protected  java.text.DateFormat timeFormatter
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
AbstractLoggingTableModel(MenuResourceBundle resources)
           
 
Method Summary
abstract  void clearLogs()
          Method clearLogs
Summary:
Use this method to clear the logs.
 int getColumnCount()
           
 java.lang.String getColumnName(int col)
           
abstract  int getLevel(int row)
          Get the integer level for a given row This is typically used to color the rows accordingly
abstract  int getSize()
           
protected  void loadLevelNames()
          Configure level names
abstract  void setSize(int newsize)
          Set the model max number o
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
getRowCount, getValueAt
 

Field Detail

levelNames

protected static java.lang.String[] levelNames
(String[]) levelNames: The correspondance between log level and string representation.


LEVEL_SCALE_FACTOR

protected static final int LEVEL_SCALE_FACTOR
(int) LEVEL_SCALE_FACTOR: the scale factor to be used, not to represent all the levels.

See Also:
Constant Field Values

menuResources

protected final MenuResourceBundle menuResources
menu resources


timeFormatter

protected java.text.DateFormat timeFormatter
Constructor Detail

AbstractLoggingTableModel

public AbstractLoggingTableModel(MenuResourceBundle resources)
Method Detail

clearLogs

public abstract void clearLogs()
Method clearLogs
Summary:
Use this method to clear the logs.


getLevel

public abstract int getLevel(int row)
Get the integer level for a given row This is typically used to color the rows accordingly

Parameters:
row - the row number
Returns:

setSize

public abstract void setSize(int newsize)
Set the model max number o

Parameters:
newsize -

getSize

public abstract int getSize()
Returns:
the model max number of rows

loadLevelNames

protected void loadLevelNames()
Configure level names


getColumnName

public java.lang.String getColumnName(int col)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getColumnCount

public int getColumnCount()