Class DigipeatAliasEnableModel

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

public class DigipeatAliasEnableModel extends AbstractTableModel
This class manages the list of digipeat aliases allowed by YAAC for a particular digipeating port.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Constructor Details

    • DigipeatAliasEnableModel

      public DigipeatAliasEnableModel(Set<String> currentAliases)
      Create a table model for modifying the global enable status of digipeat aliases.
      Parameters:
      currentAliases - a Set of String alias names
  • 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)
      Report whether the specified table cell can be edited and modified by the user.
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
      Parameters:
      rowIndex - zero-based model row index of cell
      columnIndex - zero-based model column index of cell
      Returns:
      boolean true if cell is permitted to be edited
    • setValueAt

      public void setValueAt(Object aValue, int rowIndex, int columnIndex)
      Set the value of the specified table cell.
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
      Parameters:
      aValue - new value for the cell
      rowIndex - zero-based model row index of cell
      columnIndex - zero-based model column index of cell
    • isChanged

      public boolean isChanged()
      Indicate whether any edits have occurred since the table model was instantiated.
      Returns:
      boolean true if changes were made