Changeset 10125 in josm for trunk/src/org/openstreetmap/josm/gui/correction/CorrectionTableModel.java
- Timestamp:
- 2016-04-09T17:07:54+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/correction
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/correction/CorrectionTableModel.java
r10113 r10125 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. corrector;2 package org.openstreetmap.josm.gui.correction; 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; … … 9 9 import javax.swing.table.AbstractTableModel; 10 10 11 import org.openstreetmap.josm.data.correction.Correction; 12 13 /** 14 * Abstract correction table model. 15 * @param <C> type of correction 16 */ 11 17 public abstract class CorrectionTableModel<C extends Correction> extends AbstractTableModel { 12 18 … … 15 21 private final int applyColumn; 16 22 23 /** 24 * Constructs a new {@code CorrectionTableModel}. 25 * @param corrections list of corrections 26 */ 17 27 public CorrectionTableModel(List<C> corrections) { 18 28 this.corrections = corrections; … … 27 37 protected abstract boolean isBoldCell(int row, int column); 28 38 39 /** 40 * Returns the column name for columns other than "Apply". 41 * @param colIndex column index 42 * @return the translated column name for given index 43 * @see #getApplyColumn 44 */ 29 45 public abstract String getCorrectionColumnName(int colIndex); 30 46 47 /** 48 * Returns the correction value at given position. 49 * @param rowIndex row index 50 * @param colIndex column index 51 * @return the correction value at given position 52 */ 31 53 public abstract Object getCorrectionValueAt(int rowIndex, int colIndex); 32 54 55 /** 56 * Returns the list of corrections. 57 * @return the list of corrections 58 */ 33 59 public List<C> getCorrections() { 34 60 return corrections; 35 61 } 36 62 63 /** 64 * Returns the index of the "Apply" column. 65 * @return the index of the "Apply" column 66 */ 37 67 public int getApplyColumn() { 38 68 return applyColumn; 39 69 } 40 70 71 /** 72 * Returns the "Apply" flag for given index. 73 * @param i index 74 * @return the "Apply" flag for given index 75 */ 41 76 public boolean getApply(int i) { 42 77 return apply[i];
Note:
See TracChangeset
for help on using the changeset viewer.