simtools.logging.ui
Class LoggingTableModel

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

public class LoggingTableModel
extends AbstractLoggingTableModel

See Also:
Serialized Form

Field Summary
protected  LoggingEntry[] entries
           
protected  int nbr
           
protected  int nbrMax
           
protected  int start
           
 
Fields inherited from class simtools.logging.ui.AbstractLoggingTableModel
LEVEL_SCALE_FACTOR, levelNames, menuResources, timeFormatter
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
LoggingTableModel(int size, MenuResourceBundle menuResources)
           
LoggingTableModel(MenuResourceBundle menuResources)
           
 
Method Summary
 void add(LoggingEntry log)
           
 void clearLogs()
          Method clearLogs
Summary:
Use this method to clear the logs.
 int getLevel(int row)
          Get the integer level for a given row This is typically used to color the rows accordingly
 int getRowCount()
           
 int getSize()
           
protected  java.lang.String getString(LoggingEntry log, int column)
           
 java.lang.Object getValueAt(int row, int column)
           
 void reset()
           
protected  void resize(int newSize)
           
 void setSize(int newsize)
          Set the model max number o
 
Methods inherited from class simtools.logging.ui.AbstractLoggingTableModel
getColumnCount, getColumnName, loadLevelNames
 
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
 

Field Detail

entries

protected LoggingEntry[] entries

nbr

protected int nbr

start

protected int start

nbrMax

protected int nbrMax
Constructor Detail

LoggingTableModel

public LoggingTableModel(MenuResourceBundle menuResources)

LoggingTableModel

public LoggingTableModel(int size,
                         MenuResourceBundle menuResources)
Method Detail

getSize

public int getSize()
Specified by:
getSize in class AbstractLoggingTableModel
Returns:
the model max number of rows

setSize

public void setSize(int newsize)
Description copied from class: AbstractLoggingTableModel
Set the model max number o

Specified by:
setSize in class AbstractLoggingTableModel

reset

public void reset()

add

public void add(LoggingEntry log)

resize

protected void resize(int newSize)

getRowCount

public int getRowCount()

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)

getString

protected java.lang.String getString(LoggingEntry log,
                                     int column)

getLevel

public int getLevel(int row)
Description copied from class: AbstractLoggingTableModel
Get the integer level for a given row This is typically used to color the rows accordingly

Specified by:
getLevel in class AbstractLoggingTableModel
Parameters:
row - the row number
Returns:

clearLogs

public void clearLogs()
Description copied from class: AbstractLoggingTableModel
Method clearLogs
Summary:
Use this method to clear the logs.

Specified by:
clearLogs in class AbstractLoggingTableModel