|
|||||||||
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.RawPacketTableModel
public final class RawPacketTableModel
This class wraps the SnifferDataModel with a Java Swing TableModel.
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 |
Constructor Summary | |
---|---|
RawPacketTableModel(SnifferDataModel snifferDataModel)
|
Method Summary | |
---|---|
void |
addTableModelListener(javax.swing.event.TableModelListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
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. |
AX25Frame |
getMessage(int rowIndex)
Get the AX.25 frame associated with a particular row in the RawPacketTableModel. |
RawPacketDisplayMode |
getMode()
Get the current message body rendering mode. |
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 |
isSizeToFit(int columnIndex)
Specifies whether setWidthToFit() should be enabled on this column. |
boolean |
isSortByRcvTime()
|
void |
messagesDeleted(int firstRow,
int lastRow)
Report that a block of messages has been deleted at the following range of indexes. |
void |
messagesInserted(int firstRow,
int lastRow)
Report that a block of messages has been inserted at the following range of indexes. |
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 |
scheduleToGuiThread(java.lang.Runnable r)
Schedule a short-running operation that should only occur on the GUI dispatch thread (however the implementing GUI chooses to do it). |
void |
setMode(RawPacketDisplayMode mode)
Set the current message body rendering mode. |
void |
setSortByRcvTime(boolean sortByRcvTime)
|
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, 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 |
---|
setValueAt |
Constructor Detail |
---|
public RawPacketTableModel(SnifferDataModel snifferDataModel)
Method Detail |
---|
public boolean isSortByRcvTime()
public void setSortByRcvTime(boolean sortByRcvTime)
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 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 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 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 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 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 AX25Frame getMessage(int rowIndex)
rowIndex
- zero-based row index
java.lang.IndexOutOfBoundsException
- if rowIndex not between 0 and the number of
messages in the tablepublic RawPacketDisplayMode getMode()
public void setMode(RawPacketDisplayMode mode)
mode
- the RawPacketDisplayMode to use for future renderingpublic void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener
in interface javax.swing.table.TableModel
addTableModelListener
in class javax.swing.table.AbstractTableModel
l
- the TableModelListenerpublic 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 messagesDeleted(int firstRow, int lastRow)
messagesDeleted
in interface SnifferDataListener
firstRow
- zero-based index of first messagelastRow
- zero-based index of last messagepublic void messagesInserted(int firstRow, int lastRow)
messagesInserted
in interface SnifferDataListener
firstRow
- zero-based index of first messagelastRow
- zero-based index of last messagepublic void scheduleToGuiThread(java.lang.Runnable r)
scheduleToGuiThread
in interface SnifferDataListener
r
- Runnable to be scheduled as soon as possible on the GUI threadpublic int deleteAllRows(ClearableTableModel.ClearType clearType)
deleteAllRows
in interface ClearableTableModel
clearType
- type of rows to delete
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |