Class CorrectionTableModel<C extends Correction>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean[] apply  
      private int applyColumn  
      private java.util.List<C> corrections  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CorrectionTableModel​(java.util.List<C> corrections)
      Constructs a new CorrectionTableModel.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getApply​(int i)
      Returns the "Apply" flag for given index.
      int getApplyColumn()
      Returns the index of the "Apply" column.
      java.lang.Class<?> getColumnClass​(int columnIndex)  
      java.lang.String getColumnName​(int columnIndex)  
      abstract java.lang.String getCorrectionColumnName​(int colIndex)
      Returns the column name for columns other than "Apply".
      java.util.List<C> getCorrections()
      Returns the list of corrections.
      abstract java.lang.Object getCorrectionValueAt​(int rowIndex, int colIndex)
      Returns the correction value at given position.
      int getRowCount()  
      java.lang.Object getValueAt​(int rowIndex, int colIndex)  
      protected abstract boolean isBoldCell​(int row, int column)  
      boolean isCellEditable​(int rowIndex, int columnIndex)  
      void setValueAt​(java.lang.Object aValue, int rowIndex, int columnIndex)  
      • Methods inherited from class javax.swing.table.AbstractTableModel

        addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.table.TableModel

        getColumnCount
    • Constructor Detail

      • CorrectionTableModel

        protected CorrectionTableModel​(java.util.List<C> corrections)
        Constructs a new CorrectionTableModel.
        Parameters:
        corrections - list of corrections
    • Method Detail

      • isBoldCell

        protected abstract boolean isBoldCell​(int row,
                                              int column)
      • getCorrectionColumnName

        public abstract java.lang.String getCorrectionColumnName​(int colIndex)
        Returns the column name for columns other than "Apply".
        Parameters:
        colIndex - column index
        Returns:
        the translated column name for given index
        See Also:
        getApplyColumn()
      • getCorrectionValueAt

        public abstract java.lang.Object getCorrectionValueAt​(int rowIndex,
                                                              int colIndex)
        Returns the correction value at given position.
        Parameters:
        rowIndex - row index
        colIndex - column index
        Returns:
        the correction value at given position
      • getCorrections

        public java.util.List<CgetCorrections()
        Returns the list of corrections.
        Returns:
        the list of corrections
      • getApplyColumn

        public int getApplyColumn()
        Returns the index of the "Apply" column.
        Returns:
        the index of the "Apply" column
      • getApply

        public boolean getApply​(int i)
        Returns the "Apply" flag for given index.
        Parameters:
        i - index
        Returns:
        the "Apply" flag for given index
      • getColumnClass

        public java.lang.Class<?> getColumnClass​(int columnIndex)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • getColumnName

        public java.lang.String getColumnName​(int columnIndex)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • isCellEditable

        public boolean isCellEditable​(int rowIndex,
                                      int columnIndex)
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
      • setValueAt

        public void setValueAt​(java.lang.Object aValue,
                               int rowIndex,
                               int columnIndex)
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int colIndex)