Last change
on this file since 5266 was 5266, checked in by bastiK, 12 years ago |
fixed majority of javadoc warnings by replacing "{@see" by "{@link"
|
File size:
998 bytes
|
Rev | Line | |
---|
[4689] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.gui.history;
|
---|
| 3 |
|
---|
| 4 | import java.util.ArrayList;
|
---|
| 5 | import java.util.List;
|
---|
| 6 |
|
---|
| 7 | import javax.swing.table.AbstractTableModel;
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | * Simple model storing "diff cells" in a list. Could probably have used a DefaultTableModel instead..
|
---|
| 11 | *
|
---|
[5266] | 12 | * {@link NodeListDiffTableCellRenderer}
|
---|
[4689] | 13 | */
|
---|
| 14 | class DiffTableModel extends AbstractTableModel {
|
---|
| 15 | private List<TwoColumnDiff.Item> rows;
|
---|
| 16 |
|
---|
| 17 | public void setRows(List<TwoColumnDiff.Item> rows) {
|
---|
| 18 | this.rows = rows;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | public DiffTableModel(List<TwoColumnDiff.Item> rows) {
|
---|
| 22 | this.rows = rows;
|
---|
| 23 | }
|
---|
| 24 | public DiffTableModel() {
|
---|
| 25 | this.rows = new ArrayList<TwoColumnDiff.Item>();
|
---|
| 26 | }
|
---|
| 27 | @Override
|
---|
| 28 | public int getRowCount() {
|
---|
| 29 | return rows.size();
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | @Override
|
---|
| 33 | public int getColumnCount() {
|
---|
| 34 | return 1;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | @Override
|
---|
| 38 | public TwoColumnDiff.Item getValueAt(int rowIndex, int columnIndex) {
|
---|
| 39 | return rows.get(rowIndex);
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.