Class ChangesetContentTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.openstreetmap.josm.gui.dialogs.changeset.ChangesetContentTableModel
- All Implemented Interfaces:
Serializable,TableModel
This is the table model for the content of a changeset.
- Since:
- 2689
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classThe type used internally to keep information aboutHistoryOsmPrimitivewith theirChangesetDataSet.ChangesetModificationType. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ChangesetContentTableModel.ChangesetContentEntry>private final DefaultListSelectionModelFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionChangesetContentTableModel(DefaultListSelectionModel selectionModel) Constructs a newChangesetContentTableModel. -
Method Summary
Modifier and TypeMethodDescriptionintintgetSelectedPrimitives(JTable table) Returns the selected history primitives.Replies the selection modelgetValueAt(int row, int col) booleanReplies true if there is at least one selected primitive in the table modelvoidPopulates the model with the content of a changeset.voidsetSelectedByIdx(int row) Selects a single item by its index.protected voidsort()Sort data.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Field Details
-
data
-
selectionModel
-
-
Constructor Details
-
ChangesetContentTableModel
Constructs a newChangesetContentTableModel.- Parameters:
selectionModel- selection model
-
-
Method Details
-
hasSelectedPrimitives
Replies true if there is at least one selected primitive in the table model- Returns:
- true if there is at least one selected primitive in the table model
-
setSelectedByIdx
Selects a single item by its index.- Parameters:
row- index
-
getSelectionModel
Replies the selection model- Returns:
- the selection model
-
getSelectedPrimitives
Returns the selected history primitives.- Parameters:
table- the JTable used with this model- Returns:
- the selected history primitives
-
populate
Populates the model with the content of a changeset. If ds is null, the table is cleared.- Parameters:
ds- the changeset content.
-
sort
Sort data. -
getColumnCount
-
getRowCount
-
getValueAt
-