|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.MessageModel
public class MessageModel
This class implements a TableModel for monitoring received APRS messages (actual directed or broadcast text messages, code ':').
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.ka2ddo.yaac.util.ClearableTableModel |
---|
ClearableTableModel.ClearType |
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Method Summary | |
---|---|
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 data Class for the specified 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. |
MessageMessage |
getMessage(int row)
Get a message at the specified index from the appropriate (filtered or unfiltered) list. |
AX25Message |
getMessageAt(int rowIndex)
Get a message at the specified index. |
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 |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
isShowEveryonesMessages()
Report if all Messages are to be shown, or only those addressed to this station. |
boolean |
isSizeToFit(int columnIndex)
Specifies whether setWidthToFit() should be enabled on this column. |
void |
messageAdded(StationState ss,
int index,
AX25Message msg)
Called when a AX25Message 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 |
messageRemoved(MessageMessage mm)
|
void |
setMode(RawPacketDisplayMode mode)
Specify what display mode should be used to present the message body of the specified message when the body's column is requested with the getValueAt() method. |
void |
setShowEveryonesMessages(boolean showEveryonesMessages)
Specify if all Messages are to be shown, or only those addressed to this station. |
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. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, removeTableModelListener, setValueAt |
Method Detail |
---|
public boolean isShowEveryonesMessages()
public void setShowEveryonesMessages(boolean showEveryonesMessages)
showEveryonesMessages
- boolean true if all messages are to be shown, or false for only messages addressed to this stationpublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
columnIndex
- the column being queried
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 queried
column
public int getColumnWidth(int columnIndex)
ColumnSizingTableModel
getColumnWidth
in interface ColumnSizingTableModel
columnIndex
- int index of the model's column whose width should be obtained
public boolean isSizeToFit(int columnIndex)
ColumnSizingTableModel
isSizeToFit
in interface ColumnSizingTableModel
columnIndex
- int index of the model's column whose width should be obtained
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
getRowCount()
public int getRowCount()
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 queried
public AX25Message getMessageAt(int rowIndex) throws java.lang.IndexOutOfBoundsException
getMessageAt
in interface AprsMessageContainingModel
rowIndex
- zero-based index to the specified Message
java.lang.IndexOutOfBoundsException
- if index is out of range for stored messagespublic MessageMessage getMessage(int row)
row
- zero-based index to the specified Message
java.lang.IndexOutOfBoundsException
- if index is out of range for stored messagespublic 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 compare
public void setMode(RawPacketDisplayMode mode)
AprsMessageContainingModel
setMode
in interface AprsMessageContainingModel
mode
- SnifferPacketDisplayMode enum specifying the display modeTableModel.getValueAt(int, int)
public 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 packets
that can still be decoded (such as OpenTRAC) will also be passed
here; AX25Frames that cannot be decoded will pass null herepublic 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 messageRemoved(MessageMessage mm)
public int deleteAllRows(ClearableTableModel.ClearType clearType)
deleteAllRows
in interface ClearableTableModel
clearType
- type of records to delete
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |