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, setValueAtpublic 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.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumn - The column being queriedcolumnpublic java.lang.Class getColumnClass(int columnIndex)
columnIndex.getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelcolumnIndex - The column being queriedcolumnIndexpublic 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.