Package org.ka2ddo.yaac.gui
Class DigipeatAliasEnableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.DigipeatAliasEnableModel
- All Implemented Interfaces:
Serializable
,TableModel
This class manages the list of digipeat aliases allowed by YAAC for a particular digipeating port.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorDescriptionDigipeatAliasEnableModel
(Set<String> currentAliases) Create a table model for modifying the global enable status of digipeat aliases. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
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) Report whether the specified table cell can be edited and modified by the user.boolean
Indicate whether any edits have occurred since the table model was instantiated.void
setValueAt
(Object aValue, int rowIndex, int columnIndex) Set the value of the specified table cell.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
DigipeatAliasEnableModel
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
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) Report whether the specified table cell can be edited and modified by the user.- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
- Parameters:
rowIndex
- zero-based model row index of cellcolumnIndex
- zero-based model column index of cell- Returns:
- boolean true if cell is permitted to be edited
-
setValueAt
Set the value of the specified table cell.- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
- Parameters:
aValue
- new value for the cellrowIndex
- zero-based model row index of cellcolumnIndex
- 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
-