Ignore:
Timestamp:
2016-04-09T17:07:54+02:00 (8 years ago)
Author:
Don-vip
Message:

refactor classes from corrector package, add javadoc

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  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.corrector;
     2package org.openstreetmap.josm.gui.correction;
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     
    99import javax.swing.table.AbstractTableModel;
    1010
     11import org.openstreetmap.josm.data.correction.Correction;
     12
     13/**
     14 * Abstract correction table model.
     15 * @param <C> type of correction
     16 */
    1117public abstract class CorrectionTableModel<C extends Correction> extends AbstractTableModel {
    1218
     
    1521    private final int applyColumn;
    1622
     23    /**
     24     * Constructs a new {@code CorrectionTableModel}.
     25     * @param corrections list of corrections
     26     */
    1727    public CorrectionTableModel(List<C> corrections) {
    1828        this.corrections = corrections;
     
    2737    protected abstract boolean isBoldCell(int row, int column);
    2838
     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     */
    2945    public abstract String getCorrectionColumnName(int colIndex);
    3046
     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     */
    3153    public abstract Object getCorrectionValueAt(int rowIndex, int colIndex);
    3254
     55    /**
     56     * Returns the list of corrections.
     57     * @return the list of corrections
     58     */
    3359    public List<C> getCorrections() {
    3460        return corrections;
    3561    }
    3662
     63    /**
     64     * Returns the index of the "Apply" column.
     65     * @return the index of the "Apply" column
     66     */
    3767    public int getApplyColumn() {
    3868        return applyColumn;
    3969    }
    4070
     71    /**
     72     * Returns the "Apply" flag for given index.
     73     * @param i index
     74     * @return the "Apply" flag for given index
     75     */
    4176    public boolean getApply(int i) {
    4277        return apply[i];
Note: See TracChangeset for help on using the changeset viewer.