Package org.ka2ddo.yaac.gui.osm
Class WaySelectionTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.osm.WaySelectionTableModel
- All Implemented Interfaces:
Serializable
,TableModel
Table model to pair WayType names with simple enabling checkboxes.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorDescriptionWaySelectionTableModel
(VisibleCtls visibleCtls) Create a table model for editing the specified set of controls. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyInto
(VisibleCtls visibleCtls) Transfer the way selection choices into a VisibleCtls object.Class<?>
getColumnClass
(int columnIndex) Returns Class of values from specified column.int
Returns the number of columns in the model.getColumnName
(int column) Returns the 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
.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
WaySelectionTableModel
Create a table model for editing the specified set of controls.- Parameters:
visibleCtls
- VisibleCtls object to be presented by the table model
-
-
Method Details
-
getColumnCount
public int getColumnCount()Returns the number of columns in the model. AJTable
uses this method to determine how many columns it should create and display by default.- Returns:
- the number of columns in the model
- See Also:
-
getColumnClass
Returns Class of values from specified column.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Parameters:
columnIndex
- the column being queried- Returns:
- the Class of the column values
-
getColumnName
Returns the name for the column.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
column
- the column being queried- Returns:
- a string containing the default name of
column
-
getRowCount
public int getRowCount()Returns the number of rows in the model. AJTable
uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.- 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
-
copyInto
Transfer the way selection choices into a VisibleCtls object.- Parameters:
visibleCtls
- VisibleCtls object to collect the way selection choices.
-