Package org.ka2ddo.yaac.gui
Class MessageGroupCatalogTM
java.lang.Object
javax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.MessageGroupCatalogTM
- All Implemented Interfaces:
Serializable
,TableModel
This class manages the list of callsigns (station and tactical) that are considered
for local delivery here.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorDescriptionCreate a table model for viewing the currently defined message groups. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRow()
Create a new empty entry in theMessageGroupCatalog
for the user to fill in.void
deleteRow
(int rowIndex) Delete an entry from theMessageGroupCatalog
.Class<?>
getColumnClass
(int columnIndex) Returns the data Class for the specified column.int
Returns the number of columns in the model.getColumnName
(int column) Returns the localized name for the column.int
Returns the number of rows in the model.getValueAt
(int rowIndex, int columnIndex) Returns the value for the cell atcolumnIndex
androwIndex
.boolean
isCellEditable
(int rowIndex, int columnIndex) Indicate whether the specified table cell's value can be edited by the user.void
setValueAt
(Object aValue, int rowIndex, int columnIndex) Specify the new value for a cell in the table.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
MessageGroupCatalogTM
public MessageGroupCatalogTM()Create a table model for viewing the currently defined message groups.
-
-
Method Details
-
getColumnCount
public int getColumnCount()Returns the number of columns in the model.- Returns:
- the number of columns in the model
- See Also:
-
getRowCount
public int getRowCount()Returns the number of rows in the model.- Returns:
- the number of rows in the model
- See Also:
-
getValueAt
Returns the value for the cell atcolumnIndex
androwIndex
.- Parameters:
rowIndex
- the row whose value is to be queriedcolumnIndex
- the column whose value is to be queried- Returns:
- the value Object at the specified cell
-
getColumnClass
Returns the data Class for the specified column.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Parameters:
columnIndex
- the column being queried- Returns:
- the Class object for the column's data
-
getColumnName
Returns the localized name for the column.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
column
- the column being queried- Returns:
- a string containing the name of
column
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) Indicate whether the specified table cell's value can be edited by the user.- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
- Parameters:
rowIndex
- zero-based int row index of cellcolumnIndex
- zero-based int column index of cell- Returns:
- boolean true because all cells of this table are user-editable
-
setValueAt
Specify the new value for a cell in the table.- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
- Parameters:
aValue
- Object containing new value; should be of class reported bygetColumnClass()
for the specified columnrowIndex
- zero-based int row index of cellcolumnIndex
- zero-based int column index of cell
-
addRow
public void addRow()Create a new empty entry in theMessageGroupCatalog
for the user to fill in. -
deleteRow
public void deleteRow(int rowIndex) Delete an entry from theMessageGroupCatalog
.- Parameters:
rowIndex
- zero-based int table row index of entry to delete
-