net.logAnalyzer.gui.messages
Class MessagesModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended bynet.logAnalyzer.gui.messages.MessagesModel
All Implemented Interfaces:
LALogHandlerListener, java.io.Serializable, javax.swing.table.TableModel

public class MessagesModel
extends javax.swing.table.AbstractTableModel
implements LALogHandlerListener

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
MessagesModel(LALogHandler handler)
          Constructs a new messages model under the specified handler.
 
Method Summary
 void endParsing(LALogHandler logHander)
          Receives an end parsing event.
 java.lang.Class getColumnClass(int columnIndex)
          Returns the class of the column values at the specified index in the model.
 int getColumnCount()
          Returns the count of columns in the model.
 java.lang.String getColumnName(int columnIndex)
          Returns the label of the converter of the column at the specified index in the model.
 LAConverter getConverter(int columnIndex)
          Returns the log handler converter at the specified index in the data model.
 LAConverter[] getConverters()
          Returns all log handler converters in the data model.
 int getRowCount()
          Returns the number of visible rows from the handler, after filters was applied.
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Returns the value of the cell at the specified row and column.
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns true if the cell is editable.
protected  void setLogHandler(LALogHandler logHandler)
           
 void setValueAt(java.lang.Object value, int rowIndex, int columnIndex)
          NOP.
 void startParsing(LALogHandler logHander)
          Receives a start parsing event.
 void stepParsing(LALogHandler logHandler)
          Receives a step parsing event.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagesModel

public MessagesModel(LALogHandler handler)
Constructs a new messages model under the specified handler.

Parameters:
handler - Handler used as data source.
Method Detail

setLogHandler

protected void setLogHandler(LALogHandler logHandler)

getRowCount

public int getRowCount()
Returns the number of visible rows from the handler, after filters was applied.

Specified by:
getRowCount in interface javax.swing.table.TableModel
See Also:
TableModel.getRowCount()

getConverter

public LAConverter getConverter(int columnIndex)
Returns the log handler converter at the specified index in the data model.

Parameters:
columnIndex - Column index in the data model.
Returns:
Log handler column.

getConverters

public LAConverter[] getConverters()
Returns all log handler converters in the data model. Literal converters are hidden.

Returns:
Log handler converters in the data model.

getColumnCount

public int getColumnCount()
Returns the count of columns in the model.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Returns:
Columns count.
See Also:
TableModel.getColumnCount()

getColumnName

public java.lang.String getColumnName(int columnIndex)
Returns the label of the converter of the column at the specified index in the model.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Parameters:
columnIndex - Column index in the model.
Returns:
Label of the column.
See Also:
TableModel.getColumnName(int)

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Returns the class of the column values at the specified index in the model.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Parameters:
columnIndex - Column index in the model.
Returns:
Class of the column values.
See Also:
TableModel.getColumnClass(int)

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Returns true if the cell is editable.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Returns:
true if the cell is editable.
See Also:
TableModel.isCellEditable(int, int)

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Returns the value of the cell at the specified row and column.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Returns:
Value of the specified cell.
See Also:
TableModel.getValueAt(int, int)

setValueAt

public void setValueAt(java.lang.Object value,
                       int rowIndex,
                       int columnIndex)
NOP.

Specified by:
setValueAt in interface javax.swing.table.TableModel
See Also:
TableModel.setValueAt(java.lang.Object, int, int)

startParsing

public void startParsing(LALogHandler logHander)
Receives a start parsing event.

Specified by:
startParsing in interface LALogHandlerListener
Parameters:
logHander - Log handler used as data source.
See Also:
LALogHandlerListener.startParsing(LALogHandler)

stepParsing

public void stepParsing(LALogHandler logHandler)
Receives a step parsing event.

Specified by:
stepParsing in interface LALogHandlerListener
Parameters:
logHandler - Log handler used as data source.
See Also:
LALogHandlerListener.stepParsing(LALogHandler)

endParsing

public void endParsing(LALogHandler logHander)
Receives an end parsing event. Calls setLogHandler(LALogHandler).

Specified by:
endParsing in interface LALogHandlerListener
Parameters:
logHander - Sender.
See Also:
LALogHandlerListener.endParsing(LALogHandler)


Copyright © 2006 null. All Rights Reserved.