Class DigipeatAliasTableModel

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

public class DigipeatAliasTableModel extends AbstractTableModel
This class manages the list of digipeat aliases recognized by YAAC.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Method Details

    • getInstance

      public static DigipeatAliasTableModel getInstance()
      Get a reference to the singleton DigipeatAliasCatalog.
      Returns:
      the DigipeatAliasCatalog object
    • 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 Class for data in the specified column.
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
      Parameters:
      columnIndex - the column being queried
      Returns:
      Class object for data in the column
    • 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)
      Specify whether the indexed cell is editable or not
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
      Parameters:
      rowIndex - the row being queried
      columnIndex - the column being queried
      Returns:
      all cells return boolean true for this table model
    • setValueAt

      public void setValueAt(Object aValue, int rowIndex, int columnIndex)
      Sets the value for the cell at columnIndex and rowIndex.
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
      Parameters:
      aValue - the new value Object for the specified cell
      rowIndex - the row whose value is to be queried
      columnIndex - the column whose value is to be queried
    • addRow

      public void addRow()
      Create an empty row in the table for the user to fill in.
    • deleteRow

      public void deleteRow(int rowIndex)
      Delete a row from the table, taking away that particular digipeat alias definition.
      Parameters:
      rowIndex - zero-based int index of row to delete
    • getRow

      public DigipeatAliasRecord getRow(int rowIndex)
      Get the Nth DigipeatAliasRecord in the catalog.
      Parameters:
      rowIndex - zero-based row index
      Returns:
      DigipeatAliasRecord
    • getDigipeatRecord

      public DigipeatAliasRecord getDigipeatRecord(String baseCallsign)
      Get a Digipeat alias record corresponding to the specified digipeater callsign, if such a record exists.
      Parameters:
      baseCallsign - String callsign to search for
      Returns:
      DigipeatAliasRecord describing the authorized alias, or null if no enabled match