Package eu.isas.reporter.gui.tablemodels
Class PsmTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
javax.swing.table.DefaultTableModel
com.compomics.util.gui.tablemodels.SelfUpdatingTableModel
eu.isas.reporter.gui.tablemodels.PsmTableModel
- All Implemented Interfaces:
Serializable,TableModel
public class PsmTableModel
extends com.compomics.util.gui.tablemodels.SelfUpdatingTableModel
Model for the PSM table.
- 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 which sets a new empty table.PsmTableModel(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, eu.isas.peptideshaker.utils.DisplayFeaturesGenerator displayFeaturesGenerator, DisplayPreferences displayPreferences, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, QuantificationFeaturesGenerator quantificationFeaturesGenerator, long[] psmKeys, 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.voidupdateDataModel(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, eu.isas.peptideshaker.utils.DisplayFeaturesGenerator displayFeaturesGenerator, DisplayPreferences displayPreferences, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, QuantificationFeaturesGenerator quantificationFeaturesGenerator, long[] psmKeys, boolean displayScores) 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
-
PsmTableModel
public PsmTableModel()Constructor which sets a new empty table. -
PsmTableModel
public PsmTableModel(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, eu.isas.peptideshaker.utils.DisplayFeaturesGenerator displayFeaturesGenerator, DisplayPreferences displayPreferences, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, QuantificationFeaturesGenerator quantificationFeaturesGenerator, long[] psmKeys, boolean displayScores, com.compomics.util.exceptions.ExceptionHandler exceptionHandler) Constructor which sets a new table.- Parameters:
identification- the identification object containing the matchesspectrumProvider- the spectrum providerdisplayFeaturesGenerator- the display features generatordisplayPreferences- the display preferencesidentificationParameters- the identification parametersreporterIonQuantification- the reporter quantification informationquantificationFeaturesGenerator- the quantification featurepsmKeys- the PSM 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.mass_spectrometry.SpectrumProvider spectrumProvider, eu.isas.peptideshaker.utils.DisplayFeaturesGenerator displayFeaturesGenerator, DisplayPreferences displayPreferences, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, QuantificationFeaturesGenerator quantificationFeaturesGenerator, long[] psmKeys, boolean displayScores) 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 matchesspectrumProvider- the spectrum providerdisplayFeaturesGenerator- the display features generatordisplayPreferences- the display preferencesidentificationParameters- the identification parametersreporterIonQuantification- the reporter quantification informationquantificationFeaturesGenerator- the quantification featurepsmKeys- the PSM keysdisplayScores- boolean indicating whether the scores should be displayed instead of the confidence
-
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
-