public class ListMergeModel.EntriesTableModel extends DefaultTableModel implements OsmPrimitivesTableModel
JTable
and one of the three entry lists
in the role ListRole
managed by the ListMergeModel
.
From the point of view of the JTable
it is a TableModel
.Modifier and Type | Field and Description |
---|---|
private ListRole |
role |
columnIdentifiers, dataVector
listenerList
Constructor and Description |
---|
EntriesTableModel(ListRole role) |
Modifier and Type | Method and Description |
---|---|
protected List<T> |
getEntries() |
ListMergeModel<T> |
getListMergeModel() |
protected List<T> |
getOppositeEntries()
replies the opposite list of entries with respect to the current
ComparePairType |
OsmPrimitive |
getReferredPrimitive(int idx) |
ListRole |
getRole() |
int |
getRowCount() |
Object |
getValueAt(int row,
int column) |
boolean |
isCellEditable(int row,
int column) |
boolean |
isIncludedInOppositeList(int row)
replies true if the entry at the current position is present in the opposite list
of the current
ComparePairType . |
boolean |
isParticipatingInCurrentComparePair()
replies true if the
ListRole of this ListMergeModel.EntriesTableModel
participates in the current ComparePairType |
boolean |
isSamePositionInOppositeList(int row)
replies true if the entry at
row is equal to the entry at the
same position in the opposite list of the current ComparePairType . |
void |
setValueAt(Object value,
int row,
int col) |
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTableModelListener, getColumnClass, getColumnCount, getColumnName, removeTableModelListener
public EntriesTableModel(ListRole role)
role
- the rolepublic int getRowCount()
getRowCount
in interface TableModel
getRowCount
in class DefaultTableModel
public Object getValueAt(int row, int column)
getValueAt
in interface TableModel
getValueAt
in class DefaultTableModel
public boolean isCellEditable(int row, int column)
isCellEditable
in interface TableModel
isCellEditable
in class DefaultTableModel
public void setValueAt(Object value, int row, int col)
setValueAt
in interface TableModel
setValueAt
in class DefaultTableModel
public ListMergeModel<T> getListMergeModel()
public boolean isParticipatingInCurrentComparePair()
ListRole
of this ListMergeModel.EntriesTableModel
participates in the current ComparePairType
ListRole
of this ListMergeModel.EntriesTableModel
participates in the current ComparePairType
ListMergeModel.ComparePairListModel.getSelectedComparePair()
public boolean isSamePositionInOppositeList(int row)
row
is equal to the entry at the
same position in the opposite list of the current ComparePairType
.row
- the row numberrow
is equal to the entry at the
same position in the opposite list of the current ComparePairType
IllegalStateException
- thrown, if this model is not participating in the
current ComparePairType
ComparePairType.getOppositeRole(ListRole)
,
getRole()
,
getOppositeEntries()
public boolean isIncludedInOppositeList(int row)
ComparePairType
.row
- the current rowComparePairType
.IllegalStateException
- thrown, if this model is not participating in the
current ComparePairType
ComparePairType.getOppositeRole(ListRole)
,
getRole()
,
getOppositeEntries()
protected List<T> getEntries()
protected List<T> getOppositeEntries()
ComparePairType
public OsmPrimitive getReferredPrimitive(int idx)
getReferredPrimitive
in interface OsmPrimitivesTableModel