Class WaySelectionTableModel

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

public class WaySelectionTableModel extends AbstractTableModel
Table model to pair WayType names with simple enabling checkboxes.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Constructor Details

    • WaySelectionTableModel

      public WaySelectionTableModel(VisibleCtls visibleCtls)
      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. A JTable 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

      public Class<?> getColumnClass(int columnIndex)
      Returns Class of values from specified column.
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
      Parameters:
      columnIndex - the column being queried
      Returns:
      the Class of the column values
    • getColumnName

      public String getColumnName(int column)
      Returns the 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 default name of column
    • getRowCount

      public int getRowCount()
      Returns the number of rows in the model. A JTable 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

      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
    • copyInto

      public void copyInto(VisibleCtls visibleCtls)
      Transfer the way selection choices into a VisibleCtls object.
      Parameters:
      visibleCtls - VisibleCtls object to collect the way selection choices.