Package org.ka2ddo.yaac.gui
Class BeaconSelectTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.BeaconSelectTableModel
- All Implemented Interfaces:
Serializable
,TableModel
This class manages the list of beacon identifiers recognized by YAAC for a particular transmission port.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorDescriptionBeaconSelectTableModel
(PortConfig config) Create the table model for backing a JTable for selecting the beacons to be transmitted through an associated PortConnector -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
getColumnClass
(int columnIndex) Returns the Class for the column's value.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 may be edited by the user.void
setValueAt
(Object aValue, int rowIndex, int columnIndex) Specify the new value to be stored in a cell of the table.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
BeaconSelectTableModel
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
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 Class for the column's value.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Parameters:
columnIndex
- the column being queried- Returns:
- a Class object representing the type for values in column
columnIndex
-
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 may be edited by the user.- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
- Parameters:
rowIndex
- zero-based row index of the cellcolumnIndex
- zero-based column index of the cell- Returns:
- boolean true if the specified cell can be edited
-
setValueAt
Specify the new value to be stored in a cell of the table.- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
- Parameters:
aValue
- Object of the new valuerowIndex
- zero-based row index of the cellcolumnIndex
- zero-based column index of the cell
-