public class TelemetryModel extends javax.swing.table.AbstractTableModel implements TrackerListener, FilterChangeListener
Constructor and Description |
---|
TelemetryModel() |
Modifier and Type | Method and Description |
---|---|
void |
filterSettingsChanged(Filter changedFilter,
boolean changedByUser)
Called when the specified Filter's matching criteria have been changed.
|
int |
getColumnCount()
Returns the number of columns in the model.
|
java.lang.String |
getColumnName(int column)
Returns the localized name for the column.
|
int |
getRowCount()
Returns the number of rows in the model.
|
int |
getTelemetryStationCount()
Get the number of monitored stations currently sending telemetry data.
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at
columnIndex and
rowIndex . |
boolean |
isShowEveryonesTelemetry()
Report whether all telemetry or just filtered telemetry should be shown.
|
void |
messageAdded(StationState ss,
int index,
AX25Message msg)
Called when a Message is added to the history for a station in the tracker.
|
void |
messageDeleted(StationState ss,
int index,
AX25Message msg)
Called when a AX25Message is deleted from the history for a station in the tracker.
|
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
Removes a listener from the list that's notified each time a
change to the data model occurs.
|
void |
setShowEveryonesTelemetry(boolean showEveryonesTelemetry)
Specify whether all telemetry or just filtered telemetry should be shown.
|
void |
stationAdded(StationState ss,
int index)
Called when a new station is initially added to the tracker.
|
void |
stationDeleted(StationState ss,
int index)
Called when an existing station is deleted from the tracker.
|
void |
stationUpdated(StationState ss)
Called when an existing station is updated with new information in the tracker.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, setValueAt
public boolean isShowEveryonesTelemetry()
public void setShowEveryonesTelemetry(boolean showEveryonesTelemetry)
showEveryonesTelemetry
- boolean true if all telemetering stations should be displayed, false
if only filter-passing stations should be shownpublic int getTelemetryStationCount()
public 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 int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
getRowCount()
public int getRowCount()
JTable
uses this method to determine how many rows it
should display. This method should be quick, as it
is called frequently during rendering.getRowCount
in interface javax.swing.table.TableModel
getColumnCount()
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 void messageAdded(StationState ss, int index, AX25Message msg)
messageAdded
in interface TrackerListener
ss
- StationState containing the station's informationindex
- zero-based index of the message added to the StationState objectmsg
- APRS Message object being added to the tracker; note that non-APRS packetspublic void messageDeleted(StationState ss, int index, AX25Message msg)
messageDeleted
in interface TrackerListener
ss
- StationState containing the station's information; the AX25Message
will already be removed from the StationState objectindex
- zero-based index of the message removed from the StationState objectmsg
- APRS Message object being removed from the tracker; note that non-APRS packets
that can still be decoded (such as OpenTRAC) will also be passed
here; AX25Frames that cannot be decoded will pass null herepublic void stationAdded(StationState ss, int index)
stationAdded
in interface TrackerListener
ss
- StationState containing the station's information; the initial AX25Message
will not yet be stored within the StationState objectindex
- zero-based integer sequence number for this station in the StationTrackerpublic void stationUpdated(StationState ss)
stationUpdated
in interface TrackerListener
ss
- StationState containing the station's information; the new AX25Message
will not yet be stored within the StationState objectpublic void stationDeleted(StationState ss, int index)
stationDeleted
in interface TrackerListener
ss
- StationState containing the station's informationindex
- zero-based integer sequence number for this station in the StationTrackerpublic void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener
in interface javax.swing.table.TableModel
removeTableModelListener
in class javax.swing.table.AbstractTableModel
l
- the TableModelListenerpublic void filterSettingsChanged(Filter changedFilter, boolean changedByUser)
filterSettingsChanged
in interface FilterChangeListener
changedFilter
- Filter that has changedchangedByUser
- boolean true if change was manually made by user, false if