Class BeaconSelectTableModel

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

public class BeaconSelectTableModel extends AbstractTableModel
This class manages the list of beacon identifiers recognized by YAAC for a particular transmission port.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Constructor Details

    • BeaconSelectTableModel

      public BeaconSelectTableModel(PortConfig config)
      Create the table model for backing a JTable for selecting the beacons to be transmitted through an associated PortConnector
      Parameters:
      config - PortConfig to be displayed and edited by this model
  • 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 Class for the column's value.
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
      Parameters:
      columnIndex - the column being queried
      Returns:
      a Class object representing the type for values in column columnIndex
    • 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)
      Report whether the specified table cell may be edited by the user.
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
      Parameters:
      rowIndex - zero-based row index of the cell
      columnIndex - zero-based column index of the cell
      Returns:
      boolean true if the specified cell can be edited
    • setValueAt

      public void setValueAt(Object aValue, int rowIndex, int columnIndex)
      Specify the new value to be stored in a cell of the table.
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
      Parameters:
      aValue - Object of the new value
      rowIndex - zero-based row index of the cell
      columnIndex - zero-based column index of the cell