public static class MainGui.OsmSearchResultsTableModel extends javax.swing.table.AbstractTableModel implements java.lang.Iterable<GTNWrapper>, FastComparableTableModel, MainGui.WrapperRowSource<GTNWrapper>
| Constructor and Description |
|---|
OsmSearchResultsTableModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRow(GTNWrapper gtnWrapper)
Add another row to the table.
|
void |
clear()
Clear all rows from the table.
|
int |
compareRows(int rowIndex1,
int rowIndex2,
int columnIndex)
Compare the selected column of the two rows.
|
GTNWrapper |
get(int index)
Get the entire structure in the Nth row of the table.
|
java.lang.Class<?> |
getColumnClass(int columnIndex)
Returns the data Class for the specified column.
|
int |
getColumnCount()
Returns the number of columns in the model.
|
java.lang.String |
getColumnName(int column)
Returns the localized name for the column.
|
int |
getRowCount()
Returns the number of rows in the model.
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at
columnIndex and
rowIndex. |
java.util.Iterator<GTNWrapper> |
iterator()
Returns an iterator over elements of type
T. |
void |
recalcDistance(double lat,
double lon)
Recompute the distance figure for each row based on the specified reference
coordinates.
|
void |
remove(int index)
Delete a record from the table.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtpublic int getRowCount()
getRowCount in interface javax.swing.table.TableModelgetColumnCount()public int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelgetRowCount()public java.lang.String getColumnName(int column)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumn - the column being queriedcolumnpublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelcolumnIndex - the column being queriedpublic java.lang.Object getValueAt(int rowIndex,
int columnIndex)
columnIndex and
rowIndex.getValueAt in interface javax.swing.table.TableModelrowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queriedpublic int compareRows(int rowIndex1,
int rowIndex2,
int columnIndex)
compareRows in interface FastComparableTableModelrowIndex1 - zero-based model row index of first row to comparerowIndex2 - zero-based model row index of second row to comparecolumnIndex - zero-based model column index of column to comparepublic void addRow(GTNWrapper gtnWrapper)
gtnWrapper - GTNWrapper representing the new rowpublic void clear()
public void recalcDistance(double lat,
double lon)
lat - double latitude in fractional degrees Northlon - double longitude in fractional degrees Eastpublic GTNWrapper get(int index) throws java.lang.IndexOutOfBoundsException
get in interface MainGui.WrapperRowSource<GTNWrapper>index - zero-based row indexjava.lang.IndexOutOfBoundsException - if index is out of rangepublic void remove(int index)
throws java.lang.IndexOutOfBoundsException
index - zero-based row index of the record to deletejava.lang.IndexOutOfBoundsException - if index is out of boundspublic java.util.Iterator<GTNWrapper> iterator()
T.iterator in interface java.lang.Iterable<GTNWrapper>