org.openstreetmap.josm.gui.dialogs.changeset
Class ChangesetContentTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.openstreetmap.josm.gui.dialogs.changeset.ChangesetContentTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class ChangesetContentTableModel
extends javax.swing.table.AbstractTableModel

This is the table model for the content of a changeset.

See Also:
Serialized Form

Nested Class Summary
private static class ChangesetContentTableModel.ChangesetContentEntry
          The type used internally to keep information about HistoryOsmPrimitive with their ChangesetDataSet.ChangesetModificationType.
 
Field Summary
private  java.util.ArrayList<ChangesetContentTableModel.ChangesetContentEntry> data
           
private  javax.swing.DefaultListSelectionModel selectionModel
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ChangesetContentTableModel(javax.swing.DefaultListSelectionModel selectionModel)
           
 
Method Summary
 int getColumnCount()
           
 int getRowCount()
           
 java.util.Set<HistoryOsmPrimitive> getSelectedPrimitives()
           
 javax.swing.DefaultListSelectionModel getSelectionModel()
          Replies the selection model
 java.lang.Object getValueAt(int row, int col)
           
 boolean hasSelectedPrimitives()
          Replies true if there is at least one selected primitive in the table model
 void populate(ChangesetDataSet ds)
          Populates the model with the content of a model.
 void setSelectedByIdx(int row)
           
protected  void sort()
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private final java.util.ArrayList<ChangesetContentTableModel.ChangesetContentEntry> data

selectionModel

private javax.swing.DefaultListSelectionModel selectionModel
Constructor Detail

ChangesetContentTableModel

public ChangesetContentTableModel(javax.swing.DefaultListSelectionModel selectionModel)
Method Detail

hasSelectedPrimitives

public boolean 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

public void setSelectedByIdx(int row)

getSelectionModel

public javax.swing.DefaultListSelectionModel getSelectionModel()
Replies the selection model

Returns:
the selection model

getSelectedPrimitives

public java.util.Set<HistoryOsmPrimitive> getSelectedPrimitives()

populate

public void populate(ChangesetDataSet ds)
Populates the model with the content of a model. If ds is null, the table is cleared.

Parameters:
ds - the changeset content.

sort

protected void sort()

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)


JOSM