public class DXTableModel extends javax.swing.table.AbstractTableModel implements AprsMessageListener, ColumnSizingTableModel, FastComparableTableModel, ClearableTableModel, PurgeListener, java.lang.Runnable
ClearableTableModel.ClearType
Modifier and Type | Method and Description |
---|---|
void |
aprsMessageReceived(Message msg)
Delivers the next message received by YAAC that is an APRS message.
|
int |
compareRows(int rowIndex1,
int rowIndex2,
int columnIndex)
Compare the selected column of the two rows.
|
int |
deleteAllRows(ClearableTableModel.ClearType clearType)
Delete all rows from this table.
|
java.lang.Class<?> |
getColumnClass(int columnIndex)
Returns the class of data in the column.
|
int |
getColumnCount()
Returns the number of columns in the model.
|
java.lang.String |
getColumnName(int column)
Returns the localized name for the column.
|
int |
getColumnWidth(int columnIndex)
Specifies the default initial width of a column from this model.
|
static DXTableModel |
getInstance()
Get the shareable singleton instance of DXTableModel.
|
java.lang.String |
getRecordTypeTag()
Get a tag that can be given to the
Localizer to return the
term for the records to be or that have been deleted. |
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 . |
boolean |
isSizeToFit(int columnIndex)
Specifies whether setWidthToFit() should be enabled on this column
|
void |
pruneOccurred(long oldestToBeKept,
boolean msgsWereDeleted,
boolean stationsWereDeleted)
Called when
StationTracker has finished its pruning. |
void |
run()
DO NOT CALL.
|
boolean |
tableCanContainPlayback()
Identifies whether this table can contain playback (historical) data.
|
boolean |
tableCanContainRealtime()
Identifies whether this table can contain realtime data.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
public static DXTableModel getInstance()
public void aprsMessageReceived(Message msg)
aprsMessageReceived
in interface AprsMessageListener
msg
- some subclass of Message containing the message contents; the message should have
an AX25Frame connected to itAX25Frame
,
AX25Message.ax25Frame
,
AX25Message.getAx25Frame()
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
getColumnCount()
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
getRowCount()
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
columnIndex
and
rowIndex
.getValueAt
in interface javax.swing.table.TableModel
rowIndex
- the row whose value is to be queriedcolumnIndex
- the column whose value is to be queriedpublic java.lang.String getColumnName(int column)
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)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
columnIndex
- the column being queriedpublic int getColumnWidth(int columnIndex)
getColumnWidth
in interface ColumnSizingTableModel
columnIndex
- int index of the model's column whose width should be obtainedpublic boolean isSizeToFit(int columnIndex)
isSizeToFit
in interface ColumnSizingTableModel
columnIndex
- int index of the model's column whose width should be obtainedpublic int compareRows(int rowIndex1, int rowIndex2, int columnIndex)
compareRows
in interface FastComparableTableModel
rowIndex1
- zero-based model row index of first row to comparerowIndex2
- zero-based model row index of second row to comparecolumnIndex
- zero-based model column index of column to comparepublic int deleteAllRows(ClearableTableModel.ClearType clearType)
deleteAllRows
in interface ClearableTableModel
clearType
- type of records to deletepublic boolean tableCanContainPlayback()
tableCanContainPlayback
in interface ClearableTableModel
public boolean tableCanContainRealtime()
tableCanContainRealtime
in interface ClearableTableModel
public java.lang.String getRecordTypeTag()
Localizer
to return the
term for the records to be or that have been deleted. Should translate
to a plural term, i.e., "messages" rather than "message".getRecordTypeTag
in interface ClearableTableModel
public void pruneOccurred(long oldestToBeKept, boolean msgsWereDeleted, boolean stationsWereDeleted)
StationTracker
has finished its pruning.pruneOccurred
in interface PurgeListener
oldestToBeKept
- Unix time in milliseconds since midnight Jan 1 1970 UTC of the oldest
realtime information that should be keptmsgsWereDeleted
- boolean true if any packets were purgedstationsWereDeleted
- boolean true if any stations or objects were purgedpublic void run()
run
in interface java.lang.Runnable