Class MessageGroupCatalogTM

java.lang.Object
javax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.MessageGroupCatalogTM
All Implemented Interfaces:
Serializable, TableModel

public class MessageGroupCatalogTM extends AbstractTableModel
This class manages the list of callsigns (station and tactical) that are considered for local delivery here.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • 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

      public Object getValueAt(int rowIndex, int columnIndex)
      Returns the value for the cell at columnIndex and rowIndex.
      Parameters:
      rowIndex - the row whose value is to be queried
      columnIndex - the column whose value is to be queried
      Returns:
      the value Object at the specified cell
    • getColumnClass

      public Class<?> getColumnClass(int columnIndex)
      Returns the data Class for the specified column.
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
      Parameters:
      columnIndex - the column being queried
      Returns:
      the Class object for the column's data
    • getColumnName

      public String getColumnName(int column)
      Returns the localized name for the column.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      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 interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
      Parameters:
      rowIndex - zero-based int row index of cell
      columnIndex - zero-based int column index of cell
      Returns:
      boolean true because all cells of this table are user-editable
    • setValueAt

      public void setValueAt(Object aValue, int rowIndex, int columnIndex)
      Specify the new value for a cell in the table.
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
      Parameters:
      aValue - Object containing new value; should be of class reported by getColumnClass() for the specified column
      rowIndex - zero-based int row index of cell
      columnIndex - zero-based int column index of cell
    • addRow

      public void addRow()
      Create a new empty entry in the MessageGroupCatalog for the user to fill in.
    • deleteRow

      public void deleteRow(int rowIndex)
      Delete an entry from the MessageGroupCatalog.
      Parameters:
      rowIndex - zero-based int table row index of entry to delete