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:
-
Field Summary
Fields inherited from class com.compomics.util.gui.tablemodels.SelfUpdatingTableModel
isScrollingFields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVectorFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for an empty table.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. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgetColumnClass(int columnIndex) intgetColumnName(int column) intgetValueAt(int row, int column) booleanisCellEditable(int rowIndex, int columnIndex) booleanIndicates whether the table content was instantiated.protected intloadDataForRows(ArrayList<Integer> rows, com.compomics.util.waiting.WaitingHandler waitingHandler) voidreset()Resets the peptide keys.voidshowScores(boolean showScores) Sets whether the scores should be displayed.voidupdateDataModel(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.Methods inherited from class com.compomics.util.gui.tablemodels.SelfUpdatingTableModel
addScrollListeners, addSortListener, dataMissingAtRow, getRowNumber, getViewIndex, initiateSorter, isScrolling, isSelfUpdating, needsUpdate, resetSorting, setIsScrolling, setSelfUpdating, sortMethods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAtMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
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 matchesidentificationFeaturesGenerator- the identification features generatordisplayFeaturesGenerator- the display features generatorproteinAccession- the protein accessionpeptideKeys- the peptide keysdisplayScores- boolean indicating whether the scores should be displayed instead of the confidenceexceptionHandler- 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 matchesidentificationFeaturesGenerator- the identification features generatordisplayFeaturesGenerator- the display features generatorproteinAccession- the protein accessionpeptideKeys- 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:
getRowCountin interfaceTableModel- Overrides:
getRowCountin classDefaultTableModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceTableModel- Overrides:
getColumnCountin classDefaultTableModel
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classDefaultTableModel
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel- Overrides:
getValueAtin classDefaultTableModel
-
isInstantiated
public boolean isInstantiated()Indicates whether the table content was instantiated.- Returns:
- a boolean indicating whether the table content was instantiated.
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) - Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classDefaultTableModel
-
catchException
- Specified by:
catchExceptionin classcom.compomics.util.gui.tablemodels.SelfUpdatingTableModel
-
loadDataForRows
protected int loadDataForRows(ArrayList<Integer> rows, com.compomics.util.waiting.WaitingHandler waitingHandler) - Specified by:
loadDataForRowsin classcom.compomics.util.gui.tablemodels.SelfUpdatingTableModel
-