public class MessageTableModel extends MidicaTableModel
This class represents the data model of the messages table in the MIDI sequence > MIDI messages tab of the info window.
Each row represents a single MIDI message that occurred at a certain tick. (To be picky it represents a MIDI event, because an event is a message occurring at a certain tick.)
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<SingleMessage> |
messages |
static long |
msgCount |
private static long |
serialVersionUID |
columnClasses, columnNames, sortableColumns
Constructor and Description |
---|
MessageTableModel(java.util.ArrayList<SingleMessage> messages)
Creates a new instance of the message table data model.
|
Modifier and Type | Method and Description |
---|---|
SingleMessage |
getMsg(int row)
Returns the message details from the specified visible row.
|
int |
getRowCount()
Returns the number of rows in the table - same as the sum of all messages.
|
int |
getTableRow(SingleMessage singleMessage)
Returns the row index (model) of the given message in the table.
|
java.lang.Object |
getValueAt(int rowIndex,
int colIndex)
Returns the String value to be written into the specified table cell.
|
getCategorizedHashMapRows, getCategorizedRows, getColumnClass, getColumnCount, getColumnName, getHeaderTooltip, isCellEditable, isSortable, setHeaderToolTip
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public static long msgCount
private static final long serialVersionUID
private java.util.ArrayList<SingleMessage> messages
public MessageTableModel(java.util.ArrayList<SingleMessage> messages)
Creates a new instance of the message table data model.
Initializes internal data structures.
Initializes the table header names and tooltips according to the currently configured language.
messages
- All messages found in the MIDI sequence – or null, if no sequence has been loaded yet.public int getRowCount()
Returns the number of rows in the table - same as the sum of all messages.
getRowCount
in interface javax.swing.table.TableModel
getRowCount
in class MidicaTableModel
public java.lang.Object getValueAt(int rowIndex, int colIndex)
Returns the String value to be written into the specified table cell.
getValueAt
in interface javax.swing.table.TableModel
getValueAt
in class MidicaTableModel
rowIndex
- Queried table row index.colIndex
- Queried table column index.public SingleMessage getMsg(int row)
Returns the message details from the specified visible row.
row
- Table row (beginning with 0)public int getTableRow(SingleMessage singleMessage)
Returns the row index (model) of the given message in the table.
singleMessage
- The message representing a table row.