Class PeptideTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
javax.swing.table.DefaultTableModel
com.compomics.util.gui.tablemodels.SelfUpdatingTableModel
eu.isas.peptideshaker.gui.tablemodels.PeptideTableModel
All Implemented Interfaces:
Serializable, TableModel

public class PeptideTableModel extends com.compomics.util.gui.tablemodels.SelfUpdatingTableModel
Table model for a set of peptide matches.
Author:
Marc Vaudel, Harald Barsnes
See Also:
  • Constructor Details

    • PeptideTableModel

      public PeptideTableModel()
      Constructor for an empty table.
    • PeptideTableModel

      public PeptideTableModel(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator, DisplayFeaturesGenerator displayFeaturesGenerator, String proteinAccession, long[] peptideKeys, boolean displayScores, com.compomics.util.exceptions.ExceptionHandler exceptionHandler)
      Constructor which sets a new table.
      Parameters:
      identification - the identification object containing the matches
      identificationFeaturesGenerator - the identification features generator
      displayFeaturesGenerator - the display features generator
      proteinAccession - the protein accession
      peptideKeys - the peptide keys
      displayScores - boolean indicating whether the scores should be displayed instead of the confidence
      exceptionHandler - handler for the exceptions
  • Method Details

    • updateDataModel

      public void updateDataModel(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator, DisplayFeaturesGenerator displayFeaturesGenerator, String proteinAccession, long[] peptideKeys)
      Update the data in the table model without having to reset the whole table model. This keeps the sorting order of the table.
      Parameters:
      identification - the identification object containing the matches
      identificationFeaturesGenerator - the identification features generator
      displayFeaturesGenerator - the display features generator
      proteinAccession - the protein accession
      peptideKeys - the peptide keys
    • showScores

      public void showScores(boolean showScores)
      Sets whether the scores should be displayed.
      Parameters:
      showScores - a boolean indicating whether the scores should be displayed
    • reset

      public void reset()
      Resets the peptide keys.
    • getRowCount

      public int getRowCount()
      Specified by:
      getRowCount in interface TableModel
      Overrides:
      getRowCount in class DefaultTableModel
    • getColumnCount

      public int getColumnCount()
      Specified by:
      getColumnCount in interface TableModel
      Overrides:
      getColumnCount in class DefaultTableModel
    • getColumnName

      public String getColumnName(int column)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class DefaultTableModel
    • getValueAt

      public Object getValueAt(int row, int column)
      Specified by:
      getValueAt in interface TableModel
      Overrides:
      getValueAt in class DefaultTableModel
    • isInstantiated

      public boolean isInstantiated()
      Indicates whether the table content was instantiated.
      Returns:
      a boolean indicating whether the table content was instantiated.
    • getColumnClass

      public Class getColumnClass(int columnIndex)
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
    • isCellEditable

      public boolean isCellEditable(int rowIndex, int columnIndex)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class DefaultTableModel
    • catchException

      protected void catchException(Exception e)
      Specified by:
      catchException in class com.compomics.util.gui.tablemodels.SelfUpdatingTableModel
    • loadDataForRows

      protected int loadDataForRows(ArrayList<Integer> rows, com.compomics.util.waiting.WaitingHandler waitingHandler)
      Specified by:
      loadDataForRows in class com.compomics.util.gui.tablemodels.SelfUpdatingTableModel