public class MessageTableModel
extends javax.swing.table.AbstractTableModel
Modifier and Type | Field and Description |
---|---|
static java.util.List |
COLUMN_HEADERS
List of all available column headers.
|
protected jadex.commons.collection.SortedList |
messages
SortedList of messages in table model.
|
Constructor and Description |
---|
MessageTableModel() |
Modifier and Type | Method and Description |
---|---|
boolean |
addMessage(Message message)
Add a message to the table
|
void |
addMessages(Message[] messages)
Add an array of message to the table.
|
boolean |
containsMessage(Message message)
Returns
true if the message is in the table |
java.lang.Class |
getColumnClass(int columnIndex)
Returns the class of column
columnIndex . |
int |
getColumnCount()
Returns the number of columns in the model
|
java.lang.String |
getColumnName(int columnIndex)
Returns the name for the column.
|
Message |
getMessage(int i)
Returns the message at row i.
|
int |
getRowCount()
Returns the number of rows in the model.
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at
columnIndex and
rowIndex . |
void |
removeAllMessages()
Remove all messages from table.
|
boolean |
removeMessage(Message message)
Remove a message from the table.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
public static final java.util.List COLUMN_HEADERS
protected jadex.commons.collection.SortedList messages
public boolean addMessage(Message message)
message
- The message to add.true
if successpublic boolean removeMessage(Message message)
message
- The message to remove.true
if successpublic void addMessages(Message[] messages)
messages
- The Array of messages to add.public void removeAllMessages()
public int getColumnCount()
public int getRowCount()
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
columnIndex
and
rowIndex
.rowIndex
- the row whose value is to be queriedcolumnIndex
- the column whose value is to be queriedpublic java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
column
- The column being queriedcolumn
public java.lang.Class getColumnClass(int columnIndex)
columnIndex
.getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
columnIndex
- The column being queriedcolumnIndex
public boolean containsMessage(Message message)
true
if the message is in the tablemessage
- The message queriedtrue
if the message existpublic Message getMessage(int i)
i
- The row with the message.