Search in sources :

Example 1 with PsmTableModel

use of eu.isas.peptideshaker.gui.tablemodels.PsmTableModel in project peptide-shaker by compomics.

the class OverviewPanel method clearData.

/**
 * Clear all the data.
 */
public void clearData() {
    displaySpectrum = true;
    displayCoverage = true;
    displayProteins = true;
    displayPeptidesAndPSMs = true;
    proteinKeys = new long[0];
    peptideKeys = new long[0];
    psmKeys = new long[0];
    PsmTableModel psmTableModel = (PsmTableModel) psmTable.getModel();
    psmTableModel.reset();
    PeptideTableModel peptideTableModel = (PeptideTableModel) peptideTable.getModel();
    peptideTableModel.reset();
    ProteinTableModel proteinTableModel = (ProteinTableModel) proteinTable.getModel();
    proteinTableModel.reset();
    psmTableModel.fireTableDataChanged();
    peptideTableModel.fireTableDataChanged();
    proteinTableModel.fireTableDataChanged();
    currentProteinSequence = "";
    spectrumPanel = null;
    sequenceCoverageInnerPanel.removeAll();
    sequencePtmsPanel.removeAll();
    sequenceVariationsPanel.removeAll();
    fragmentIonsJScrollPane.setViewportView(null);
    bubbleJPanel.removeAll();
    spectrumJPanel.removeAll();
    secondarySpectrumPlotsJPanel.removeAll();
    ((TitledBorder) proteinsLayeredPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Proteins" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
    proteinsLayeredPanel.repaint();
    ((TitledBorder) peptidesPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Peptides" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
    peptidesPanel.repaint();
    ((TitledBorder) psmsPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Peptide Spectrum Matches" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
    psmsPanel.repaint();
    ((TitledBorder) spectrumMainPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
    spectrumMainPanel.repaint();
    ((TitledBorder) sequenceCoverageTitledPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Protein Sequence Coverage" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
    sequenceCoverageTitledPanel.repaint();
}
Also used : PsmTableModel(eu.isas.peptideshaker.gui.tablemodels.PsmTableModel) ProteinTableModel(eu.isas.peptideshaker.gui.tablemodels.ProteinTableModel) TitledBorder(javax.swing.border.TitledBorder) PeptideTableModel(eu.isas.peptideshaker.gui.tablemodels.PeptideTableModel)

Example 2 with PsmTableModel

use of eu.isas.peptideshaker.gui.tablemodels.PsmTableModel in project peptide-shaker by compomics.

the class OverviewPanel method initComponents.

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    selectJPopupMenu = new javax.swing.JPopupMenu();
    selectAllMenuItem = new javax.swing.JMenuItem();
    deselectAllMenuItem = new javax.swing.JMenuItem();
    sequenceCoverageJPopupMenu = new javax.swing.JPopupMenu();
    coverageShowAllPeptidesJRadioButtonMenuItem = new javax.swing.JRadioButtonMenuItem();
    coverageShowEnzymaticPeptidesOnlyJRadioButtonMenuItem = new javax.swing.JRadioButtonMenuItem();
    coverageShowTruncatedPeptidesOnlyJRadioButtonMenuItem = new javax.swing.JRadioButtonMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    coverageShowPossiblePeptidesJCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
    coveragePeptideTypesButtonGroup = new javax.swing.ButtonGroup();
    sequenceCoverageExportPopupMenu = new javax.swing.JPopupMenu();
    sequenceCoveragePlotExportMenuItem = new javax.swing.JMenuItem();
    sequenceCoverageSequenceExportMenuItem = new javax.swing.JMenuItem();
    backgroundLayeredPane = new javax.swing.JLayeredPane();
    overviewJPanel = new javax.swing.JPanel();
    overviewJSplitPane = new javax.swing.JSplitPane();
    proteinsJPanel = new javax.swing.JPanel();
    proteinsLayeredPane = new javax.swing.JLayeredPane();
    proteinsLayeredPanel = new javax.swing.JPanel();
    proteinScrollPane = new javax.swing.JScrollPane();
    proteinTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) proteinTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    proteinsHelpJButton = new javax.swing.JButton();
    exportProteinsJButton = new javax.swing.JButton();
    hideProteinsJButton = new javax.swing.JButton();
    contextMenuProteinsBackgroundPanel = new javax.swing.JPanel();
    coverageJSplitPane = new javax.swing.JSplitPane();
    sequenceCoverageJPanel = new javax.swing.JPanel();
    sequenceCoverageLayeredPane = new javax.swing.JLayeredPane();
    sequenceCoverageTitledPanel = new javax.swing.JPanel();
    sequencePtmsPanel = new javax.swing.JPanel();
    sequenceCoverageInnerPanel = new javax.swing.JPanel();
    sequenceVariationsPanel = new javax.swing.JPanel();
    sequenceCoveragetHelpJButton = new javax.swing.JButton();
    exportSequenceCoverageContextJButton = new javax.swing.JButton();
    hideCoverageJButton = new javax.swing.JButton();
    sequenceCoverageOptionsJButton = new javax.swing.JButton();
    contextMenuSequenceCoverageBackgroundPanel = new javax.swing.JPanel();
    peptidesPsmSpectrumFragmentIonsJSplitPane = new javax.swing.JSplitPane();
    peptidesPsmJSplitPane = new javax.swing.JSplitPane();
    peptidesJPanel = new javax.swing.JPanel();
    peptidesLayeredPane = new javax.swing.JLayeredPane();
    peptidesPanel = new javax.swing.JPanel();
    peptideScrollPane = new javax.swing.JScrollPane();
    peptideTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) peptideTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    peptidesHelpJButton = new javax.swing.JButton();
    exportPeptidesJButton = new javax.swing.JButton();
    hidePeptideAndPsmsJButton = new javax.swing.JButton();
    contextMenuPeptidesBackgroundPanel = new javax.swing.JPanel();
    psmJPanel = new javax.swing.JPanel();
    psmsLayeredPane = new javax.swing.JLayeredPane();
    psmsPanel = new javax.swing.JPanel();
    spectraScrollPane = new javax.swing.JScrollPane();
    psmTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) psmTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    psmsHelpJButton = new javax.swing.JButton();
    exportPsmsJButton = new javax.swing.JButton();
    hidePeptideAndPsmsJButton2 = new javax.swing.JButton();
    contextMenuPsmsBackgroundPanel = new javax.swing.JPanel();
    spectrumMainJPanel = new javax.swing.JPanel();
    spectrumLayeredPane = new javax.swing.JLayeredPane();
    spectrumMainPanel = new javax.swing.JPanel();
    slidersSplitPane = new javax.swing.JSplitPane();
    spectrumJTabbedPane = new javax.swing.JTabbedPane();
    fragmentIonJPanel = new javax.swing.JPanel();
    fragmentIonsJScrollPane = new javax.swing.JScrollPane();
    ionTableJToolBar = new javax.swing.JToolBar();
    ionTableAnnotationMenuPanel = new javax.swing.JPanel();
    bubblePlotTabJPanel = new javax.swing.JPanel();
    bubbleJPanel = new javax.swing.JPanel();
    bubblePlotJToolBar = new javax.swing.JToolBar();
    bubbleAnnotationMenuPanel = new javax.swing.JPanel();
    spectrumContainerJPanel = new javax.swing.JPanel();
    spectrumJToolBar = new javax.swing.JToolBar();
    spectrumAnnotationMenuPanel = new javax.swing.JPanel();
    spectrumSplitPane = new javax.swing.JSplitPane();
    secondarySpectrumPlotsJPanel = new javax.swing.JPanel();
    spectrumOuterJPanel = new javax.swing.JPanel();
    spectrumPaddingPanel = new javax.swing.JPanel();
    spectrumJPanel = new javax.swing.JPanel();
    slidersPanel = new javax.swing.JPanel();
    accuracySlider = new javax.swing.JSlider();
    intensitySlider = new javax.swing.JSlider();
    spectrumHelpJButton = new javax.swing.JButton();
    exportSpectrumJButton = new javax.swing.JButton();
    hideSpectrumPanelJButton = new javax.swing.JButton();
    maximizeSpectrumPanelJButton = new javax.swing.JButton();
    contextMenuSpectrumBackgroundPanel = new javax.swing.JPanel();
    toolBar = new javax.swing.JToolBar();
    showProteinsBeforeSeparator = new javax.swing.JPopupMenu.Separator();
    showProteinsJButton = new javax.swing.JButton();
    showProteinsAfterSeparator = new javax.swing.JPopupMenu.Separator();
    showPeptidesAndPsmsJButton = new javax.swing.JButton();
    showPeptidesAfterSeparator = new javax.swing.JPopupMenu.Separator();
    showSpectrumJButton = new javax.swing.JButton();
    showSpectrumAfterSeparator = new javax.swing.JPopupMenu.Separator();
    showCoverageJButton = new javax.swing.JButton();
    showCoverageAfterSeparator = new javax.swing.JPopupMenu.Separator();
    selectAllMenuItem.setText("Select All");
    selectAllMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            selectAllMenuItemActionPerformed(evt);
        }
    });
    selectJPopupMenu.add(selectAllMenuItem);
    deselectAllMenuItem.setText("Deselect All");
    deselectAllMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deselectAllMenuItemActionPerformed(evt);
        }
    });
    selectJPopupMenu.add(deselectAllMenuItem);
    coveragePeptideTypesButtonGroup.add(coverageShowAllPeptidesJRadioButtonMenuItem);
    coverageShowAllPeptidesJRadioButtonMenuItem.setSelected(true);
    coverageShowAllPeptidesJRadioButtonMenuItem.setText("All Peptides");
    coverageShowAllPeptidesJRadioButtonMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            coverageShowAllPeptidesJRadioButtonMenuItemActionPerformed(evt);
        }
    });
    sequenceCoverageJPopupMenu.add(coverageShowAllPeptidesJRadioButtonMenuItem);
    coveragePeptideTypesButtonGroup.add(coverageShowEnzymaticPeptidesOnlyJRadioButtonMenuItem);
    coverageShowEnzymaticPeptidesOnlyJRadioButtonMenuItem.setText("Enzymatic Peptides");
    coverageShowEnzymaticPeptidesOnlyJRadioButtonMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            coverageShowEnzymaticPeptidesOnlyJRadioButtonMenuItemActionPerformed(evt);
        }
    });
    sequenceCoverageJPopupMenu.add(coverageShowEnzymaticPeptidesOnlyJRadioButtonMenuItem);
    coveragePeptideTypesButtonGroup.add(coverageShowTruncatedPeptidesOnlyJRadioButtonMenuItem);
    coverageShowTruncatedPeptidesOnlyJRadioButtonMenuItem.setText("Non Enzymatic Peptides");
    coverageShowTruncatedPeptidesOnlyJRadioButtonMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            coverageShowTruncatedPeptidesOnlyJRadioButtonMenuItemActionPerformed(evt);
        }
    });
    sequenceCoverageJPopupMenu.add(coverageShowTruncatedPeptidesOnlyJRadioButtonMenuItem);
    sequenceCoverageJPopupMenu.add(jSeparator1);
    coverageShowPossiblePeptidesJCheckBoxMenuItem.setSelected(true);
    coverageShowPossiblePeptidesJCheckBoxMenuItem.setText("Possible Coverage");
    coverageShowPossiblePeptidesJCheckBoxMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            coverageShowPossiblePeptidesJCheckBoxMenuItemActionPerformed(evt);
        }
    });
    sequenceCoverageJPopupMenu.add(coverageShowPossiblePeptidesJCheckBoxMenuItem);
    sequenceCoveragePlotExportMenuItem.setText("Sequence Coverage Plot");
    sequenceCoveragePlotExportMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            sequenceCoveragePlotExportMenuItemActionPerformed(evt);
        }
    });
    sequenceCoverageExportPopupMenu.add(sequenceCoveragePlotExportMenuItem);
    sequenceCoverageSequenceExportMenuItem.setText("Protein Sequence");
    sequenceCoverageSequenceExportMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            sequenceCoverageSequenceExportMenuItemActionPerformed(evt);
        }
    });
    sequenceCoverageExportPopupMenu.add(sequenceCoverageSequenceExportMenuItem);
    setOpaque(false);
    addComponentListener(new java.awt.event.ComponentAdapter() {

        public void componentResized(java.awt.event.ComponentEvent evt) {
            formComponentResized(evt);
        }
    });
    overviewJPanel.setBackground(new java.awt.Color(255, 255, 255));
    overviewJPanel.setOpaque(false);
    overviewJPanel.setPreferredSize(new java.awt.Dimension(900, 800));
    overviewJSplitPane.setBorder(null);
    overviewJSplitPane.setDividerLocation(300);
    overviewJSplitPane.setDividerSize(0);
    overviewJSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
    overviewJSplitPane.setResizeWeight(0.5);
    proteinsJPanel.setOpaque(false);
    // NOI18N
    proteinsLayeredPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Proteins", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("sansserif", 1, 14)));
    proteinsLayeredPanel.setOpaque(false);
    proteinTable.setModel(new ProteinTableModel());
    proteinTable.setGridColor(new java.awt.Color(204, 204, 204));
    proteinTable.setOpaque(false);
    proteinTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    proteinTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            proteinTableMouseMoved(evt);
        }
    });
    proteinTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseClicked(java.awt.event.MouseEvent evt) {
            proteinTableMouseClicked(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            proteinTableMouseExited(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            proteinTableMouseReleased(evt);
        }
    });
    proteinTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            proteinTableKeyReleased(evt);
        }
    });
    proteinScrollPane.setViewportView(proteinTable);
    proteinTable.getAccessibleContext().setAccessibleName("ProteinTable");
    javax.swing.GroupLayout proteinsLayeredPanelLayout = new javax.swing.GroupLayout(proteinsLayeredPanel);
    proteinsLayeredPanel.setLayout(proteinsLayeredPanelLayout);
    proteinsLayeredPanelLayout.setHorizontalGroup(proteinsLayeredPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 938, Short.MAX_VALUE).addGroup(proteinsLayeredPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(proteinsLayeredPanelLayout.createSequentialGroup().addContainerGap().addComponent(proteinScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 918, Short.MAX_VALUE).addContainerGap())));
    proteinsLayeredPanelLayout.setVerticalGroup(proteinsLayeredPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 255, Short.MAX_VALUE).addGroup(proteinsLayeredPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(proteinsLayeredPanelLayout.createSequentialGroup().addContainerGap().addComponent(proteinScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 243, Short.MAX_VALUE).addContainerGap())));
    proteinsLayeredPane.add(proteinsLayeredPanel);
    proteinsLayeredPanel.setBounds(0, 0, 950, 300);
    // NOI18N
    proteinsHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    proteinsHelpJButton.setToolTipText("Help");
    proteinsHelpJButton.setBorder(null);
    proteinsHelpJButton.setBorderPainted(false);
    proteinsHelpJButton.setContentAreaFilled(false);
    // NOI18N
    proteinsHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    proteinsHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            proteinsHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            proteinsHelpJButtonMouseExited(evt);
        }
    });
    proteinsHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            proteinsHelpJButtonActionPerformed(evt);
        }
    });
    proteinsLayeredPane.setLayer(proteinsHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    proteinsLayeredPane.add(proteinsHelpJButton);
    proteinsHelpJButton.setBounds(930, 0, 10, 19);
    // NOI18N
    exportProteinsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportProteinsJButton.setToolTipText("Copy to File");
    exportProteinsJButton.setBorder(null);
    exportProteinsJButton.setBorderPainted(false);
    exportProteinsJButton.setContentAreaFilled(false);
    // NOI18N
    exportProteinsJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportProteinsJButton.setEnabled(false);
    // NOI18N
    exportProteinsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportProteinsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportProteinsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportProteinsJButtonMouseExited(evt);
        }
    });
    exportProteinsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportProteinsJButtonActionPerformed(evt);
        }
    });
    proteinsLayeredPane.setLayer(exportProteinsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    proteinsLayeredPane.add(exportProteinsJButton);
    exportProteinsJButton.setBounds(920, 0, 10, 19);
    // NOI18N
    hideProteinsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide_grey.png")));
    hideProteinsJButton.setToolTipText("Hide Proteins (Shift+Ctrl+P)");
    hideProteinsJButton.setBorder(null);
    hideProteinsJButton.setBorderPainted(false);
    hideProteinsJButton.setContentAreaFilled(false);
    // NOI18N
    hideProteinsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide.png")));
    hideProteinsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            hideProteinsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            hideProteinsJButtonMouseExited(evt);
        }
    });
    hideProteinsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            hideProteinsJButtonActionPerformed(evt);
        }
    });
    proteinsLayeredPane.setLayer(hideProteinsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    proteinsLayeredPane.add(hideProteinsJButton);
    hideProteinsJButton.setBounds(910, 0, 10, 19);
    contextMenuProteinsBackgroundPanel.setOpaque(false);
    javax.swing.GroupLayout contextMenuProteinsBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuProteinsBackgroundPanel);
    contextMenuProteinsBackgroundPanel.setLayout(contextMenuProteinsBackgroundPanelLayout);
    contextMenuProteinsBackgroundPanelLayout.setHorizontalGroup(contextMenuProteinsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 40, Short.MAX_VALUE));
    contextMenuProteinsBackgroundPanelLayout.setVerticalGroup(contextMenuProteinsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    proteinsLayeredPane.setLayer(contextMenuProteinsBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    proteinsLayeredPane.add(contextMenuProteinsBackgroundPanel);
    contextMenuProteinsBackgroundPanel.setBounds(910, 0, 40, 19);
    javax.swing.GroupLayout proteinsJPanelLayout = new javax.swing.GroupLayout(proteinsJPanel);
    proteinsJPanel.setLayout(proteinsJPanelLayout);
    proteinsJPanelLayout.setHorizontalGroup(proteinsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(proteinsLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 960, Short.MAX_VALUE));
    proteinsJPanelLayout.setVerticalGroup(proteinsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(proteinsLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE));
    overviewJSplitPane.setTopComponent(proteinsJPanel);
    coverageJSplitPane.setBorder(null);
    coverageJSplitPane.setDividerLocation(350);
    coverageJSplitPane.setDividerSize(0);
    coverageJSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
    coverageJSplitPane.setResizeWeight(1.0);
    sequenceCoverageJPanel.setOpaque(false);
    sequenceCoverageTitledPanel.setBackground(new java.awt.Color(255, 255, 255));
    // NOI18N
    sequenceCoverageTitledPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Protein Sequence Coverage", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("sansserif", 1, 14)));
    sequenceCoverageTitledPanel.setOpaque(false);
    sequencePtmsPanel.setBackground(new java.awt.Color(255, 255, 255));
    sequencePtmsPanel.setOpaque(false);
    sequencePtmsPanel.setLayout(new javax.swing.BoxLayout(sequencePtmsPanel, javax.swing.BoxLayout.LINE_AXIS));
    sequenceCoverageInnerPanel.setOpaque(false);
    sequenceCoverageInnerPanel.setLayout(new javax.swing.BoxLayout(sequenceCoverageInnerPanel, javax.swing.BoxLayout.LINE_AXIS));
    sequenceVariationsPanel.setBackground(new java.awt.Color(255, 255, 255));
    sequenceVariationsPanel.setOpaque(false);
    sequenceVariationsPanel.setLayout(new javax.swing.BoxLayout(sequenceVariationsPanel, javax.swing.BoxLayout.LINE_AXIS));
    javax.swing.GroupLayout sequenceCoverageTitledPanelLayout = new javax.swing.GroupLayout(sequenceCoverageTitledPanel);
    sequenceCoverageTitledPanel.setLayout(sequenceCoverageTitledPanelLayout);
    sequenceCoverageTitledPanelLayout.setHorizontalGroup(sequenceCoverageTitledPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(sequenceCoverageTitledPanelLayout.createSequentialGroup().addContainerGap().addGroup(sequenceCoverageTitledPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(sequenceVariationsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(sequenceCoverageInnerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(sequencePtmsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 918, Short.MAX_VALUE)).addContainerGap()));
    sequenceCoverageTitledPanelLayout.setVerticalGroup(sequenceCoverageTitledPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(sequenceCoverageTitledPanelLayout.createSequentialGroup().addGap(0, 0, 0).addComponent(sequencePtmsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 7, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(2, 2, 2).addComponent(sequenceCoverageInnerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE).addGap(2, 2, 2).addComponent(sequenceVariationsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 7, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(0, 0, 0)));
    sequenceCoverageLayeredPane.add(sequenceCoverageTitledPanel);
    sequenceCoverageTitledPanel.setBounds(0, 0, 950, 230);
    // NOI18N
    sequenceCoveragetHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    sequenceCoveragetHelpJButton.setToolTipText("Help");
    sequenceCoveragetHelpJButton.setBorder(null);
    sequenceCoveragetHelpJButton.setBorderPainted(false);
    sequenceCoveragetHelpJButton.setContentAreaFilled(false);
    // NOI18N
    sequenceCoveragetHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    sequenceCoveragetHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            sequenceCoveragetHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            sequenceCoveragetHelpJButtonMouseExited(evt);
        }
    });
    sequenceCoveragetHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            sequenceCoveragetHelpJButtonActionPerformed(evt);
        }
    });
    sequenceCoverageLayeredPane.setLayer(sequenceCoveragetHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    sequenceCoverageLayeredPane.add(sequenceCoveragetHelpJButton);
    sequenceCoveragetHelpJButton.setBounds(930, 0, 10, 19);
    // NOI18N
    exportSequenceCoverageContextJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportSequenceCoverageContextJButton.setToolTipText("Export");
    exportSequenceCoverageContextJButton.setBorder(null);
    exportSequenceCoverageContextJButton.setBorderPainted(false);
    exportSequenceCoverageContextJButton.setContentAreaFilled(false);
    // NOI18N
    exportSequenceCoverageContextJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportSequenceCoverageContextJButton.setEnabled(false);
    // NOI18N
    exportSequenceCoverageContextJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportSequenceCoverageContextJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportSequenceCoverageContextJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportSequenceCoverageContextJButtonMouseExited(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            exportSequenceCoverageContextJButtonMouseReleased(evt);
        }
    });
    sequenceCoverageLayeredPane.setLayer(exportSequenceCoverageContextJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    sequenceCoverageLayeredPane.add(exportSequenceCoverageContextJButton);
    exportSequenceCoverageContextJButton.setBounds(920, 0, 10, 19);
    // NOI18N
    hideCoverageJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide_grey.png")));
    hideCoverageJButton.setToolTipText("Hide Coverage (Shift+Ctrl+E)");
    hideCoverageJButton.setBorder(null);
    hideCoverageJButton.setBorderPainted(false);
    hideCoverageJButton.setContentAreaFilled(false);
    // NOI18N
    hideCoverageJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide.png")));
    hideCoverageJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            hideCoverageJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            hideCoverageJButtonMouseExited(evt);
        }
    });
    hideCoverageJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            hideCoverageJButtonActionPerformed(evt);
        }
    });
    sequenceCoverageLayeredPane.setLayer(hideCoverageJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    sequenceCoverageLayeredPane.add(hideCoverageJButton);
    hideCoverageJButton.setBounds(910, 0, 10, 19);
    // NOI18N
    sequenceCoverageOptionsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/contextual_menu_gray.png")));
    sequenceCoverageOptionsJButton.setToolTipText("Coverage Options");
    sequenceCoverageOptionsJButton.setBorder(null);
    sequenceCoverageOptionsJButton.setBorderPainted(false);
    sequenceCoverageOptionsJButton.setContentAreaFilled(false);
    // NOI18N
    sequenceCoverageOptionsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/contextual_menu_black.png")));
    sequenceCoverageOptionsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            sequenceCoverageOptionsJButtonMouseReleased(evt);
        }

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            sequenceCoverageOptionsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            sequenceCoverageOptionsJButtonMouseExited(evt);
        }
    });
    sequenceCoverageLayeredPane.setLayer(sequenceCoverageOptionsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    sequenceCoverageLayeredPane.add(sequenceCoverageOptionsJButton);
    sequenceCoverageOptionsJButton.setBounds(895, 5, 10, 19);
    contextMenuSequenceCoverageBackgroundPanel.setOpaque(false);
    javax.swing.GroupLayout contextMenuSequenceCoverageBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuSequenceCoverageBackgroundPanel);
    contextMenuSequenceCoverageBackgroundPanel.setLayout(contextMenuSequenceCoverageBackgroundPanelLayout);
    contextMenuSequenceCoverageBackgroundPanelLayout.setHorizontalGroup(contextMenuSequenceCoverageBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 50, Short.MAX_VALUE));
    contextMenuSequenceCoverageBackgroundPanelLayout.setVerticalGroup(contextMenuSequenceCoverageBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    sequenceCoverageLayeredPane.setLayer(contextMenuSequenceCoverageBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    sequenceCoverageLayeredPane.add(contextMenuSequenceCoverageBackgroundPanel);
    contextMenuSequenceCoverageBackgroundPanel.setBounds(890, 0, 50, 19);
    javax.swing.GroupLayout sequenceCoverageJPanelLayout = new javax.swing.GroupLayout(sequenceCoverageJPanel);
    sequenceCoverageJPanel.setLayout(sequenceCoverageJPanelLayout);
    sequenceCoverageJPanelLayout.setHorizontalGroup(sequenceCoverageJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(sequenceCoverageLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 960, Short.MAX_VALUE));
    sequenceCoverageJPanelLayout.setVerticalGroup(sequenceCoverageJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(sequenceCoverageLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE));
    coverageJSplitPane.setRightComponent(sequenceCoverageJPanel);
    peptidesPsmSpectrumFragmentIonsJSplitPane.setBorder(null);
    peptidesPsmSpectrumFragmentIonsJSplitPane.setDividerLocation(450);
    peptidesPsmSpectrumFragmentIonsJSplitPane.setDividerSize(0);
    peptidesPsmSpectrumFragmentIonsJSplitPane.setResizeWeight(0.5);
    peptidesPsmJSplitPane.setBorder(null);
    peptidesPsmJSplitPane.setDividerLocation(175);
    peptidesPsmJSplitPane.setDividerSize(0);
    peptidesPsmJSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
    peptidesPsmJSplitPane.setResizeWeight(0.5);
    peptidesJPanel.setOpaque(false);
    // NOI18N
    peptidesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Peptides", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("sansserif", 1, 14)));
    peptidesPanel.setOpaque(false);
    peptideTable.setModel(new PeptideTableModel());
    peptideTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    peptideTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            peptideTableMouseMoved(evt);
        }
    });
    peptideTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseClicked(java.awt.event.MouseEvent evt) {
            peptideTableMouseClicked(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            peptideTableMouseExited(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            peptideTableMouseReleased(evt);
        }
    });
    peptideTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            peptideTableKeyReleased(evt);
        }
    });
    peptideScrollPane.setViewportView(peptideTable);
    javax.swing.GroupLayout peptidesPanelLayout = new javax.swing.GroupLayout(peptidesPanel);
    peptidesPanel.setLayout(peptidesPanelLayout);
    peptidesPanelLayout.setHorizontalGroup(peptidesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 438, Short.MAX_VALUE).addGroup(peptidesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(peptidesPanelLayout.createSequentialGroup().addContainerGap().addComponent(peptideScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 418, Short.MAX_VALUE).addContainerGap())));
    peptidesPanelLayout.setVerticalGroup(peptidesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 125, Short.MAX_VALUE).addGroup(peptidesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(peptidesPanelLayout.createSequentialGroup().addContainerGap().addComponent(peptideScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE).addContainerGap())));
    peptidesLayeredPane.add(peptidesPanel);
    peptidesPanel.setBounds(0, 0, 450, 170);
    // NOI18N
    peptidesHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    peptidesHelpJButton.setToolTipText("Help");
    peptidesHelpJButton.setBorder(null);
    peptidesHelpJButton.setBorderPainted(false);
    peptidesHelpJButton.setContentAreaFilled(false);
    // NOI18N
    peptidesHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    peptidesHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            peptidesHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            peptidesHelpJButtonMouseExited(evt);
        }
    });
    peptidesHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            peptidesHelpJButtonActionPerformed(evt);
        }
    });
    peptidesLayeredPane.setLayer(peptidesHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    peptidesLayeredPane.add(peptidesHelpJButton);
    peptidesHelpJButton.setBounds(430, 0, 10, 19);
    // NOI18N
    exportPeptidesJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPeptidesJButton.setToolTipText("Copy to File");
    exportPeptidesJButton.setBorder(null);
    exportPeptidesJButton.setBorderPainted(false);
    exportPeptidesJButton.setContentAreaFilled(false);
    // NOI18N
    exportPeptidesJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPeptidesJButton.setEnabled(false);
    // NOI18N
    exportPeptidesJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportPeptidesJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportPeptidesJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportPeptidesJButtonMouseExited(evt);
        }
    });
    exportPeptidesJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportPeptidesJButtonActionPerformed(evt);
        }
    });
    peptidesLayeredPane.setLayer(exportPeptidesJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    peptidesLayeredPane.add(exportPeptidesJButton);
    exportPeptidesJButton.setBounds(420, 0, 10, 19);
    // NOI18N
    hidePeptideAndPsmsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide_grey.png")));
    hidePeptideAndPsmsJButton.setToolTipText("Hide Peptides & PSMs (Shift+Ctrl+E)");
    hidePeptideAndPsmsJButton.setBorder(null);
    hidePeptideAndPsmsJButton.setBorderPainted(false);
    hidePeptideAndPsmsJButton.setContentAreaFilled(false);
    // NOI18N
    hidePeptideAndPsmsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide.png")));
    hidePeptideAndPsmsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            hidePeptideAndPsmsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            hidePeptideAndPsmsJButtonMouseExited(evt);
        }
    });
    hidePeptideAndPsmsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            hidePeptideAndPsmsJButtonActionPerformed(evt);
        }
    });
    peptidesLayeredPane.setLayer(hidePeptideAndPsmsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    peptidesLayeredPane.add(hidePeptideAndPsmsJButton);
    hidePeptideAndPsmsJButton.setBounds(410, 0, 10, 19);
    contextMenuPeptidesBackgroundPanel.setOpaque(false);
    javax.swing.GroupLayout contextMenuPeptidesBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuPeptidesBackgroundPanel);
    contextMenuPeptidesBackgroundPanel.setLayout(contextMenuPeptidesBackgroundPanelLayout);
    contextMenuPeptidesBackgroundPanelLayout.setHorizontalGroup(contextMenuPeptidesBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 40, Short.MAX_VALUE));
    contextMenuPeptidesBackgroundPanelLayout.setVerticalGroup(contextMenuPeptidesBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    peptidesLayeredPane.setLayer(contextMenuPeptidesBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    peptidesLayeredPane.add(contextMenuPeptidesBackgroundPanel);
    contextMenuPeptidesBackgroundPanel.setBounds(400, 0, 40, 19);
    javax.swing.GroupLayout peptidesJPanelLayout = new javax.swing.GroupLayout(peptidesJPanel);
    peptidesJPanel.setLayout(peptidesJPanelLayout);
    peptidesJPanelLayout.setHorizontalGroup(peptidesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(peptidesLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE));
    peptidesJPanelLayout.setVerticalGroup(peptidesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(peptidesLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE));
    peptidesPsmJSplitPane.setTopComponent(peptidesJPanel);
    psmJPanel.setOpaque(false);
    // NOI18N
    psmsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Peptide Spectrum Matches", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("sansserif", 1, 14)));
    psmsPanel.setOpaque(false);
    psmTable.setModel(new PsmTableModel());
    psmTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            psmTableMouseMoved(evt);
        }
    });
    psmTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseClicked(java.awt.event.MouseEvent evt) {
            psmTableMouseClicked(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            psmTableMouseExited(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            psmTableMouseReleased(evt);
        }
    });
    psmTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            psmTableKeyReleased(evt);
        }
    });
    spectraScrollPane.setViewportView(psmTable);
    javax.swing.GroupLayout psmsPanelLayout = new javax.swing.GroupLayout(psmsPanel);
    psmsPanel.setLayout(psmsPanelLayout);
    psmsPanelLayout.setHorizontalGroup(psmsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 438, Short.MAX_VALUE).addGroup(psmsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(psmsPanelLayout.createSequentialGroup().addContainerGap().addComponent(spectraScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 418, Short.MAX_VALUE).addContainerGap())));
    psmsPanelLayout.setVerticalGroup(psmsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 125, Short.MAX_VALUE).addGroup(psmsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(psmsPanelLayout.createSequentialGroup().addContainerGap().addComponent(spectraScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE).addContainerGap())));
    psmsLayeredPane.add(psmsPanel);
    psmsPanel.setBounds(0, 0, 450, 170);
    // NOI18N
    psmsHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    psmsHelpJButton.setToolTipText("Help");
    psmsHelpJButton.setBorder(null);
    psmsHelpJButton.setBorderPainted(false);
    psmsHelpJButton.setContentAreaFilled(false);
    // NOI18N
    psmsHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    psmsHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            psmsHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            psmsHelpJButtonMouseExited(evt);
        }
    });
    psmsHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            psmsHelpJButtonActionPerformed(evt);
        }
    });
    psmsLayeredPane.setLayer(psmsHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    psmsLayeredPane.add(psmsHelpJButton);
    psmsHelpJButton.setBounds(430, 0, 10, 19);
    // NOI18N
    exportPsmsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPsmsJButton.setToolTipText("Copy to File");
    exportPsmsJButton.setBorder(null);
    exportPsmsJButton.setBorderPainted(false);
    exportPsmsJButton.setContentAreaFilled(false);
    // NOI18N
    exportPsmsJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPsmsJButton.setEnabled(false);
    // NOI18N
    exportPsmsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportPsmsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportPsmsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportPsmsJButtonMouseExited(evt);
        }
    });
    exportPsmsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportPsmsJButtonActionPerformed(evt);
        }
    });
    psmsLayeredPane.setLayer(exportPsmsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    psmsLayeredPane.add(exportPsmsJButton);
    exportPsmsJButton.setBounds(420, 0, 10, 19);
    // NOI18N
    hidePeptideAndPsmsJButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide_grey.png")));
    hidePeptideAndPsmsJButton2.setToolTipText("Hide Peptides & PSMs (Shift+Ctrl+E)");
    hidePeptideAndPsmsJButton2.setBorder(null);
    hidePeptideAndPsmsJButton2.setBorderPainted(false);
    hidePeptideAndPsmsJButton2.setContentAreaFilled(false);
    // NOI18N
    hidePeptideAndPsmsJButton2.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide.png")));
    hidePeptideAndPsmsJButton2.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            hidePeptideAndPsmsJButton2MouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            hidePeptideAndPsmsJButton2MouseExited(evt);
        }
    });
    hidePeptideAndPsmsJButton2.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            hidePeptideAndPsmsJButton2ActionPerformed(evt);
        }
    });
    psmsLayeredPane.setLayer(hidePeptideAndPsmsJButton2, javax.swing.JLayeredPane.POPUP_LAYER);
    psmsLayeredPane.add(hidePeptideAndPsmsJButton2);
    hidePeptideAndPsmsJButton2.setBounds(410, 0, 10, 19);
    contextMenuPsmsBackgroundPanel.setOpaque(false);
    javax.swing.GroupLayout contextMenuPsmsBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuPsmsBackgroundPanel);
    contextMenuPsmsBackgroundPanel.setLayout(contextMenuPsmsBackgroundPanelLayout);
    contextMenuPsmsBackgroundPanelLayout.setHorizontalGroup(contextMenuPsmsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 40, Short.MAX_VALUE));
    contextMenuPsmsBackgroundPanelLayout.setVerticalGroup(contextMenuPsmsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    psmsLayeredPane.setLayer(contextMenuPsmsBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    psmsLayeredPane.add(contextMenuPsmsBackgroundPanel);
    contextMenuPsmsBackgroundPanel.setBounds(400, 0, 40, 19);
    javax.swing.GroupLayout psmJPanelLayout = new javax.swing.GroupLayout(psmJPanel);
    psmJPanel.setLayout(psmJPanelLayout);
    psmJPanelLayout.setHorizontalGroup(psmJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(psmsLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE));
    psmJPanelLayout.setVerticalGroup(psmJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(psmsLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE));
    peptidesPsmJSplitPane.setRightComponent(psmJPanel);
    peptidesPsmSpectrumFragmentIonsJSplitPane.setLeftComponent(peptidesPsmJSplitPane);
    spectrumMainJPanel.setOpaque(false);
    // NOI18N
    spectrumMainPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Spectrum & Fragment Ions", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("sansserif", 1, 14)));
    spectrumMainPanel.setOpaque(false);
    slidersSplitPane.setBackground(new java.awt.Color(51, 51, 51));
    slidersSplitPane.setBorder(null);
    slidersSplitPane.setDividerLocation(430);
    slidersSplitPane.setDividerSize(0);
    spectrumJTabbedPane.setBackground(new java.awt.Color(51, 51, 51));
    spectrumJTabbedPane.setTabPlacement(javax.swing.JTabbedPane.BOTTOM);
    spectrumJTabbedPane.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            spectrumJTabbedPaneStateChanged(evt);
        }
    });
    spectrumJTabbedPane.addMouseWheelListener(new java.awt.event.MouseWheelListener() {

        public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
            spectrumJTabbedPaneMouseWheelMoved(evt);
        }
    });
    spectrumJTabbedPane.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            spectrumJTabbedPaneMouseEntered(evt);
        }
    });
    fragmentIonJPanel.setOpaque(false);
    fragmentIonsJScrollPane.addMouseWheelListener(new java.awt.event.MouseWheelListener() {

        public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
            fragmentIonsJScrollPaneMouseWheelMoved(evt);
        }
    });
    ionTableJToolBar.setBackground(new java.awt.Color(255, 255, 255));
    ionTableJToolBar.setBorder(null);
    ionTableJToolBar.setFloatable(false);
    ionTableJToolBar.setRollover(true);
    ionTableJToolBar.setBorderPainted(false);
    ionTableJToolBar.setOpaque(false);
    ionTableAnnotationMenuPanel.setLayout(new javax.swing.BoxLayout(ionTableAnnotationMenuPanel, javax.swing.BoxLayout.LINE_AXIS));
    ionTableJToolBar.add(ionTableAnnotationMenuPanel);
    javax.swing.GroupLayout fragmentIonJPanelLayout = new javax.swing.GroupLayout(fragmentIonJPanel);
    fragmentIonJPanel.setLayout(fragmentIonJPanelLayout);
    fragmentIonJPanelLayout.setHorizontalGroup(fragmentIonJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, fragmentIonJPanelLayout.createSequentialGroup().addContainerGap().addGroup(fragmentIonJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addComponent(fragmentIonsJScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 401, Short.MAX_VALUE).addComponent(ionTableJToolBar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE)).addContainerGap()));
    fragmentIonJPanelLayout.setVerticalGroup(fragmentIonJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, fragmentIonJPanelLayout.createSequentialGroup().addContainerGap().addComponent(fragmentIonsJScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(ionTableJToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));
    spectrumJTabbedPane.addTab("Ion Table", fragmentIonJPanel);
    bubblePlotTabJPanel.setBackground(new java.awt.Color(255, 255, 255));
    bubblePlotTabJPanel.setOpaque(false);
    bubbleJPanel.setOpaque(false);
    bubbleJPanel.setLayout(new javax.swing.BoxLayout(bubbleJPanel, javax.swing.BoxLayout.LINE_AXIS));
    bubblePlotJToolBar.setBackground(new java.awt.Color(255, 255, 255));
    bubblePlotJToolBar.setBorder(null);
    bubblePlotJToolBar.setFloatable(false);
    bubblePlotJToolBar.setRollover(true);
    bubblePlotJToolBar.setBorderPainted(false);
    bubblePlotJToolBar.setOpaque(false);
    bubbleAnnotationMenuPanel.setLayout(new javax.swing.BoxLayout(bubbleAnnotationMenuPanel, javax.swing.BoxLayout.LINE_AXIS));
    bubblePlotJToolBar.add(bubbleAnnotationMenuPanel);
    javax.swing.GroupLayout bubblePlotTabJPanelLayout = new javax.swing.GroupLayout(bubblePlotTabJPanel);
    bubblePlotTabJPanel.setLayout(bubblePlotTabJPanelLayout);
    bubblePlotTabJPanelLayout.setHorizontalGroup(bubblePlotTabJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(bubblePlotTabJPanelLayout.createSequentialGroup().addContainerGap().addComponent(bubblePlotJToolBar, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE).addContainerGap()).addGroup(bubblePlotTabJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(bubbleJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE)));
    bubblePlotTabJPanelLayout.setVerticalGroup(bubblePlotTabJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(bubblePlotTabJPanelLayout.createSequentialGroup().addContainerGap(269, Short.MAX_VALUE).addComponent(bubblePlotJToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGroup(bubblePlotTabJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(bubblePlotTabJPanelLayout.createSequentialGroup().addComponent(bubbleJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE).addGap(25, 25, 25))));
    spectrumJTabbedPane.addTab("Bubble Plot", bubblePlotTabJPanel);
    spectrumContainerJPanel.setOpaque(false);
    spectrumJToolBar.setBackground(new java.awt.Color(255, 255, 255));
    spectrumJToolBar.setBorder(null);
    spectrumJToolBar.setFloatable(false);
    spectrumJToolBar.setRollover(true);
    spectrumJToolBar.setBorderPainted(false);
    spectrumJToolBar.setOpaque(false);
    spectrumAnnotationMenuPanel.setLayout(new javax.swing.BoxLayout(spectrumAnnotationMenuPanel, javax.swing.BoxLayout.LINE_AXIS));
    spectrumJToolBar.add(spectrumAnnotationMenuPanel);
    spectrumSplitPane.setBorder(null);
    spectrumSplitPane.setDividerLocation(80);
    spectrumSplitPane.setDividerSize(0);
    spectrumSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
    secondarySpectrumPlotsJPanel.setMinimumSize(new java.awt.Dimension(0, 80));
    secondarySpectrumPlotsJPanel.setOpaque(false);
    secondarySpectrumPlotsJPanel.setLayout(new javax.swing.BoxLayout(secondarySpectrumPlotsJPanel, javax.swing.BoxLayout.LINE_AXIS));
    spectrumSplitPane.setTopComponent(secondarySpectrumPlotsJPanel);
    spectrumOuterJPanel.setOpaque(false);
    spectrumPaddingPanel.setOpaque(false);
    javax.swing.GroupLayout spectrumPaddingPanelLayout = new javax.swing.GroupLayout(spectrumPaddingPanel);
    spectrumPaddingPanel.setLayout(spectrumPaddingPanelLayout);
    spectrumPaddingPanelLayout.setHorizontalGroup(spectrumPaddingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    spectrumPaddingPanelLayout.setVerticalGroup(spectrumPaddingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 17, Short.MAX_VALUE));
    spectrumJPanel.setOpaque(false);
    spectrumJPanel.setLayout(new java.awt.BorderLayout());
    javax.swing.GroupLayout spectrumOuterJPanelLayout = new javax.swing.GroupLayout(spectrumOuterJPanel);
    spectrumOuterJPanel.setLayout(spectrumOuterJPanelLayout);
    spectrumOuterJPanelLayout.setHorizontalGroup(spectrumOuterJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(spectrumPaddingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(spectrumJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE));
    spectrumOuterJPanelLayout.setVerticalGroup(spectrumOuterJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(spectrumOuterJPanelLayout.createSequentialGroup().addComponent(spectrumPaddingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(spectrumJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)));
    spectrumSplitPane.setRightComponent(spectrumOuterJPanel);
    javax.swing.GroupLayout spectrumContainerJPanelLayout = new javax.swing.GroupLayout(spectrumContainerJPanel);
    spectrumContainerJPanel.setLayout(spectrumContainerJPanelLayout);
    spectrumContainerJPanelLayout.setHorizontalGroup(spectrumContainerJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(spectrumContainerJPanelLayout.createSequentialGroup().addContainerGap().addComponent(spectrumJToolBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addContainerGap()).addComponent(spectrumSplitPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE));
    spectrumContainerJPanelLayout.setVerticalGroup(spectrumContainerJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, spectrumContainerJPanelLayout.createSequentialGroup().addComponent(spectrumSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(spectrumJToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));
    spectrumJTabbedPane.addTab("Spectrum", spectrumContainerJPanel);
    spectrumJTabbedPane.setSelectedIndex(2);
    slidersSplitPane.setLeftComponent(spectrumJTabbedPane);
    slidersPanel.setOpaque(false);
    accuracySlider.setOrientation(javax.swing.JSlider.VERTICAL);
    accuracySlider.setPaintTicks(true);
    accuracySlider.setToolTipText("Annotation Accuracy");
    accuracySlider.setValue(100);
    accuracySlider.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            accuracySliderStateChanged(evt);
        }
    });
    accuracySlider.addMouseWheelListener(new java.awt.event.MouseWheelListener() {

        public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
            accuracySliderMouseWheelMoved(evt);
        }
    });
    intensitySlider.setOrientation(javax.swing.JSlider.VERTICAL);
    intensitySlider.setPaintTicks(true);
    intensitySlider.setToolTipText("Annotation Level");
    intensitySlider.setValue(75);
    intensitySlider.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            intensitySliderStateChanged(evt);
        }
    });
    intensitySlider.addMouseWheelListener(new java.awt.event.MouseWheelListener() {

        public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
            intensitySliderMouseWheelMoved(evt);
        }
    });
    javax.swing.GroupLayout slidersPanelLayout = new javax.swing.GroupLayout(slidersPanel);
    slidersPanel.setLayout(slidersPanelLayout);
    slidersPanelLayout.setHorizontalGroup(slidersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, slidersPanelLayout.createSequentialGroup().addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGroup(slidersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addComponent(accuracySlider, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(intensitySlider, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(0, 0, 0)));
    slidersPanelLayout.setVerticalGroup(slidersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(slidersPanelLayout.createSequentialGroup().addGap(29, 29, 29).addComponent(accuracySlider, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE).addGap(29, 29, 29).addComponent(intensitySlider, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE).addGap(66, 66, 66)));
    slidersSplitPane.setRightComponent(slidersPanel);
    javax.swing.GroupLayout spectrumMainPanelLayout = new javax.swing.GroupLayout(spectrumMainPanel);
    spectrumMainPanel.setLayout(spectrumMainPanelLayout);
    spectrumMainPanelLayout.setHorizontalGroup(spectrumMainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(spectrumMainPanelLayout.createSequentialGroup().addContainerGap().addComponent(slidersSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 458, Short.MAX_VALUE).addContainerGap()));
    spectrumMainPanelLayout.setVerticalGroup(spectrumMainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(spectrumMainPanelLayout.createSequentialGroup().addComponent(slidersSplitPane).addContainerGap()));
    spectrumLayeredPane.add(spectrumMainPanel);
    spectrumMainPanel.setBounds(0, 0, 490, 350);
    // NOI18N
    spectrumHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    spectrumHelpJButton.setToolTipText("Help");
    spectrumHelpJButton.setBorder(null);
    spectrumHelpJButton.setBorderPainted(false);
    spectrumHelpJButton.setContentAreaFilled(false);
    // NOI18N
    spectrumHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    spectrumHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            spectrumHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            spectrumHelpJButtonMouseExited(evt);
        }
    });
    spectrumHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            spectrumHelpJButtonActionPerformed(evt);
        }
    });
    spectrumLayeredPane.setLayer(spectrumHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    spectrumLayeredPane.add(spectrumHelpJButton);
    spectrumHelpJButton.setBounds(460, 0, 10, 19);
    // NOI18N
    exportSpectrumJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportSpectrumJButton.setToolTipText("Export");
    exportSpectrumJButton.setBorder(null);
    exportSpectrumJButton.setBorderPainted(false);
    exportSpectrumJButton.setContentAreaFilled(false);
    // NOI18N
    exportSpectrumJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportSpectrumJButton.setEnabled(false);
    // NOI18N
    exportSpectrumJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportSpectrumJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportSpectrumJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportSpectrumJButtonMouseExited(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            exportSpectrumJButtonMouseReleased(evt);
        }
    });
    spectrumLayeredPane.setLayer(exportSpectrumJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    spectrumLayeredPane.add(exportSpectrumJButton);
    exportSpectrumJButton.setBounds(450, 0, 10, 19);
    // NOI18N
    hideSpectrumPanelJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide_grey.png")));
    hideSpectrumPanelJButton.setToolTipText("Hide Spectrum (Shift+Ctrl+E)");
    hideSpectrumPanelJButton.setBorder(null);
    hideSpectrumPanelJButton.setBorderPainted(false);
    hideSpectrumPanelJButton.setContentAreaFilled(false);
    // NOI18N
    hideSpectrumPanelJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/hide.png")));
    hideSpectrumPanelJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            hideSpectrumPanelJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            hideSpectrumPanelJButtonMouseExited(evt);
        }
    });
    hideSpectrumPanelJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            hideSpectrumPanelJButtonActionPerformed(evt);
        }
    });
    spectrumLayeredPane.setLayer(hideSpectrumPanelJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    spectrumLayeredPane.add(hideSpectrumPanelJButton);
    hideSpectrumPanelJButton.setBounds(440, 0, 10, 19);
    // NOI18N
    maximizeSpectrumPanelJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/maximize_grey.png")));
    maximizeSpectrumPanelJButton.setToolTipText("Maximize Spectrum");
    maximizeSpectrumPanelJButton.setBorder(null);
    maximizeSpectrumPanelJButton.setBorderPainted(false);
    maximizeSpectrumPanelJButton.setContentAreaFilled(false);
    // NOI18N
    maximizeSpectrumPanelJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/maximize.png")));
    maximizeSpectrumPanelJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            maximizeSpectrumPanelJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            maximizeSpectrumPanelJButtonMouseExited(evt);
        }
    });
    maximizeSpectrumPanelJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            maximizeSpectrumPanelJButtonActionPerformed(evt);
        }
    });
    spectrumLayeredPane.setLayer(maximizeSpectrumPanelJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    spectrumLayeredPane.add(maximizeSpectrumPanelJButton);
    maximizeSpectrumPanelJButton.setBounds(425, 5, 10, 19);
    contextMenuSpectrumBackgroundPanel.setOpaque(false);
    javax.swing.GroupLayout contextMenuSpectrumBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuSpectrumBackgroundPanel);
    contextMenuSpectrumBackgroundPanel.setLayout(contextMenuSpectrumBackgroundPanelLayout);
    contextMenuSpectrumBackgroundPanelLayout.setHorizontalGroup(contextMenuSpectrumBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 60, Short.MAX_VALUE));
    contextMenuSpectrumBackgroundPanelLayout.setVerticalGroup(contextMenuSpectrumBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    spectrumLayeredPane.setLayer(contextMenuSpectrumBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    spectrumLayeredPane.add(contextMenuSpectrumBackgroundPanel);
    contextMenuSpectrumBackgroundPanel.setBounds(420, 0, 60, 19);
    javax.swing.GroupLayout spectrumMainJPanelLayout = new javax.swing.GroupLayout(spectrumMainJPanel);
    spectrumMainJPanel.setLayout(spectrumMainJPanelLayout);
    spectrumMainJPanelLayout.setHorizontalGroup(spectrumMainJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(spectrumLayeredPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 510, Short.MAX_VALUE));
    spectrumMainJPanelLayout.setVerticalGroup(spectrumMainJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(spectrumLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE));
    peptidesPsmSpectrumFragmentIonsJSplitPane.setRightComponent(spectrumMainJPanel);
    coverageJSplitPane.setLeftComponent(peptidesPsmSpectrumFragmentIonsJSplitPane);
    overviewJSplitPane.setRightComponent(coverageJSplitPane);
    javax.swing.GroupLayout overviewJPanelLayout = new javax.swing.GroupLayout(overviewJPanel);
    overviewJPanel.setLayout(overviewJPanelLayout);
    overviewJPanelLayout.setHorizontalGroup(overviewJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(overviewJPanelLayout.createSequentialGroup().addContainerGap().addComponent(overviewJSplitPane).addContainerGap()));
    overviewJPanelLayout.setVerticalGroup(overviewJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(overviewJPanelLayout.createSequentialGroup().addContainerGap().addComponent(overviewJSplitPane).addContainerGap()));
    backgroundLayeredPane.add(overviewJPanel);
    overviewJPanel.setBounds(0, 0, 980, 720);
    toolBar.setBackground(new java.awt.Color(255, 255, 255));
    toolBar.setBorder(null);
    toolBar.setFloatable(false);
    toolBar.setRollover(true);
    toolBar.setOpaque(false);
    showProteinsBeforeSeparator.setOrientation(javax.swing.SwingConstants.VERTICAL);
    showProteinsBeforeSeparator.setOpaque(true);
    toolBar.add(showProteinsBeforeSeparator);
    // NOI18N
    showProteinsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/list2.gif")));
    showProteinsJButton.setText("Proteins");
    showProteinsJButton.setToolTipText("Click to Show (Shift+Ctrl+P)");
    showProteinsJButton.setFocusable(false);
    showProteinsJButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    showProteinsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            showProteinsJButtonActionPerformed(evt);
        }
    });
    toolBar.add(showProteinsJButton);
    showProteinsAfterSeparator.setOrientation(javax.swing.SwingConstants.VERTICAL);
    showProteinsAfterSeparator.setOpaque(true);
    toolBar.add(showProteinsAfterSeparator);
    // NOI18N
    showPeptidesAndPsmsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/list2.gif")));
    showPeptidesAndPsmsJButton.setText("Peptides & PSMs");
    showPeptidesAndPsmsJButton.setToolTipText("Click to Show (Shift+Ctrl+E)");
    showPeptidesAndPsmsJButton.setFocusable(false);
    showPeptidesAndPsmsJButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    showPeptidesAndPsmsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            showPeptidesAndPsmsJButtonActionPerformed(evt);
        }
    });
    toolBar.add(showPeptidesAndPsmsJButton);
    showPeptidesAfterSeparator.setOrientation(javax.swing.SwingConstants.VERTICAL);
    showPeptidesAfterSeparator.setOpaque(true);
    toolBar.add(showPeptidesAfterSeparator);
    // NOI18N
    showSpectrumJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/spectrum.GIF")));
    showSpectrumJButton.setText("Spectrum & Fragment Ions");
    showSpectrumJButton.setToolTipText("Click to Show (Shift+Ctrl+S)");
    showSpectrumJButton.setFocusable(false);
    showSpectrumJButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    showSpectrumJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            showSpectrumJButtonActionPerformed(evt);
        }
    });
    toolBar.add(showSpectrumJButton);
    showSpectrumAfterSeparator.setOrientation(javax.swing.SwingConstants.VERTICAL);
    showSpectrumAfterSeparator.setOpaque(true);
    toolBar.add(showSpectrumAfterSeparator);
    // NOI18N
    showCoverageJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/coverage3.gif")));
    showCoverageJButton.setText("Protein Sequence Coverage");
    showCoverageJButton.setToolTipText("Click to Show (Shift+Ctrl+C)");
    showCoverageJButton.setFocusable(false);
    showCoverageJButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    showCoverageJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            showCoverageJButtonActionPerformed(evt);
        }
    });
    toolBar.add(showCoverageJButton);
    showCoverageAfterSeparator.setOrientation(javax.swing.SwingConstants.VERTICAL);
    showCoverageAfterSeparator.setOpaque(true);
    toolBar.add(showCoverageAfterSeparator);
    backgroundLayeredPane.add(toolBar);
    toolBar.setBounds(0, 720, 980, 20);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 977, Short.MAX_VALUE).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(backgroundLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 977, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 742, Short.MAX_VALUE).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(backgroundLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 742, Short.MAX_VALUE)));
}
Also used : PsmTableModel(eu.isas.peptideshaker.gui.tablemodels.PsmTableModel) JTableHeader(javax.swing.table.JTableHeader) MouseAdapter(java.awt.event.MouseAdapter) ProteinTableModel(eu.isas.peptideshaker.gui.tablemodels.ProteinTableModel) KeyEvent(java.awt.event.KeyEvent) PeptideTableModel(eu.isas.peptideshaker.gui.tablemodels.PeptideTableModel) MouseEvent(java.awt.event.MouseEvent) MouseEvent(java.awt.event.MouseEvent) javax.swing(javax.swing) java.awt(java.awt)

Example 3 with PsmTableModel

use of eu.isas.peptideshaker.gui.tablemodels.PsmTableModel in project peptide-shaker by compomics.

the class OverviewPanel method updateSpectrumPanelBorderTitle.

/**
 * Update the spectrum and fragment ions panel border title with information
 * about the currently selected PSM.
 *
 * @param currentPeptide the current peptide
 * @param currentSpectrum the current spectrum
 */
private void updateSpectrumPanelBorderTitle(Spectrum currentSpectrum) {
    if (peptideTable.getSelectedRow() != -1 && proteinTable.getSelectedRow() != -1 && psmTable.getSelectedRow() != -1) {
        Identification identification = peptideShakerGUI.getIdentification();
        int nAA = peptideShakerGUI.getDisplayParameters().getnAASurroundingPeptides();
        SequenceProvider sequenceProvider = peptideShakerGUI.getSequenceProvider();
        SelfUpdatingTableModel psmTableModel = (SelfUpdatingTableModel) psmTable.getModel();
        int psmIndex = psmTableModel.getViewIndex(psmTable.getSelectedRow());
        long spectrumMatchKey = psmKeys[psmIndex];
        SpectrumMatch spectrumMatch = identification.getSpectrumMatch(spectrumMatchKey);
        PeptideAssumption peptideAssumption = spectrumMatch.getBestPeptideAssumption();
        SelfUpdatingTableModel peptideTableModel = (SelfUpdatingTableModel) peptideTable.getModel();
        int peptideIndex = peptideTableModel.getViewIndex(peptideTable.getSelectedRow());
        long peptideKey = peptideKeys[peptideIndex];
        PeptideMatch peptideMatch = identification.getPeptideMatch(peptideKey);
        Peptide peptide = peptideMatch.getPeptide();
        SelfUpdatingTableModel proteinTableModel = (SelfUpdatingTableModel) proteinTable.getModel();
        long proteinKey = proteinKeys[proteinTableModel.getViewIndex(proteinTable.getSelectedRow())];
        ProteinMatch proteinMatch = identification.getProteinMatch(proteinKey);
        String leadingAccession = proteinMatch.getLeadingAccession();
        String aaBefore = Arrays.stream(peptide.getProteinMapping().get(leadingAccession)).mapToObj(index -> PeptideUtils.getAaBefore(peptide, leadingAccession, index, nAA, sequenceProvider)).collect(Collectors.joining("|"));
        String aaAfter = Arrays.stream(peptide.getProteinMapping().get(leadingAccession)).mapToObj(index -> PeptideUtils.getAaAfter(peptide, leadingAccession, index, nAA, sequenceProvider)).collect(Collectors.joining("|"));
        if (!aaBefore.equals("")) {
            aaBefore += " - ";
        }
        if (!aaAfter.equals("")) {
            aaAfter = " - " + aaAfter;
        }
        if (psmTable.getSelectedRowCount() == 1) {
            String modifiedSequence = peptideShakerGUI.getDisplayFeaturesGenerator().getTaggedPeptideSequence(spectrumMatch, false, false, true);
            ((TitledBorder) spectrumMainPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions (" + aaBefore + modifiedSequence + aaAfter + "   " + Charge.toString(peptideAssumption.getIdentificationCharge()) + "   " + Util.roundDouble(currentSpectrum.getPrecursor().mz, 2) + " m/z)" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
        } else if (psmTable.getSelectedRowCount() == 2) {
            int[] selectedRows = psmTable.getSelectedRows();
            psmIndex = psmTableModel.getViewIndex(selectedRows[0]);
            spectrumMatchKey = psmKeys[psmIndex];
            SpectrumMatch firstSpectrumMatch = identification.getSpectrumMatch(spectrumMatchKey);
            String firstModifiedSequence = peptideShakerGUI.getDisplayFeaturesGenerator().getTaggedPeptideSequence(firstSpectrumMatch, false, false, true);
            psmIndex = psmTableModel.getViewIndex(selectedRows[1]);
            spectrumMatchKey = psmKeys[psmIndex];
            SpectrumMatch secondSpectrumMatch = identification.getSpectrumMatch(spectrumMatchKey);
            String secondModifiedSequence = peptideShakerGUI.getDisplayFeaturesGenerator().getTaggedPeptideSequence(secondSpectrumMatch, false, false, true);
            ((TitledBorder) spectrumMainPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions (" + firstModifiedSequence + " vs. " + secondModifiedSequence + ")" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
        } else {
            PeptideMatch currentPeptideMatch = (PeptideMatch) peptideShakerGUI.getIdentification().retrieveObject(peptideKey);
            String peptideSequence = peptideShakerGUI.getDisplayFeaturesGenerator().getTaggedPeptideSequence(currentPeptideMatch, false, false, true);
            ((TitledBorder) spectrumMainPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions (" + peptideSequence + " " + psmTable.getSelectedRowCount() + " PSMs)" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
        }
        spectrumMainPanel.repaint();
    } else {
        ((TitledBorder) spectrumMainPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Spectrum & Fragment Ions" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
        spectrumMainPanel.repaint();
    }
}
Also used : MatchType(eu.isas.peptideshaker.gui.MatchValidationDialog.MatchType) PsPeptideFeature(com.compomics.util.io.export.features.peptideshaker.PsPeptideFeature) PsProteinFeature(com.compomics.util.io.export.features.peptideshaker.PsProteinFeature) NO_KEY(com.compomics.util.experiment.personalization.ExperimentObject.NO_KEY) IdentificationFeaturesGenerator(com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator) JSparklinesDataSeries(no.uib.jsparklines.data.JSparklinesDataSeries) FileAndFileFilter(com.compomics.util.gui.file_handling.FileAndFileFilter) BareBonesBrowserLaunch(com.compomics.util.examples.BareBonesBrowserLaunch) FileChooserUtil(com.compomics.util.gui.file_handling.FileChooserUtil) JTableHeader(javax.swing.table.JTableHeader) ProteinInferencePeptideLevelDialog(eu.isas.peptideshaker.gui.protein_inference.ProteinInferencePeptideLevelDialog) PeptideShakerGUI(eu.isas.peptideshaker.gui.PeptideShakerGUI) SpecificAnnotationParameters(com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters) SpectrumAnnotator(com.compomics.util.experiment.identification.spectrum_annotation.SpectrumAnnotator) MouseAdapter(java.awt.event.MouseAdapter) TitledBorder(javax.swing.border.TitledBorder) JSparklinesDataset(no.uib.jsparklines.data.JSparklinesDataset) SpectrumProvider(com.compomics.util.experiment.mass_spectrometry.SpectrumProvider) PeptideTableModel(eu.isas.peptideshaker.gui.tablemodels.PeptideTableModel) Variant(com.compomics.util.experiment.biology.variants.Variant) TableProperties(com.compomics.util.gui.TableProperties) SpectrumCountingMethod(com.compomics.util.experiment.quantification.spectrumcounting.SpectrumCountingMethod) ModificationParameters(com.compomics.util.parameters.identification.search.ModificationParameters) ProteinSequencePanelParent(eu.isas.peptideshaker.gui.protein_sequence.ProteinSequencePanelParent) PSModificationScores(com.compomics.util.experiment.identification.peptide_shaker.PSModificationScores) Clipboard(java.awt.datatransfer.Clipboard) TableModelEvent(javax.swing.event.TableModelEvent) ExportScheme(com.compomics.util.io.export.ExportScheme) PeptideAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.PeptideAssumption) DefaultTableModel(javax.swing.table.DefaultTableModel) TrueFalseIconRenderer(no.uib.jsparklines.extra.TrueFalseIconRenderer) SequenceMatchingParameters(com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters) PSExportFactory(eu.isas.peptideshaker.export.PSExportFactory) SelfUpdatingTableModel(com.compomics.util.gui.tablemodels.SelfUpdatingTableModel) Util(com.compomics.util.Util) KeyEvent(java.awt.event.KeyEvent) Collectors(java.util.stream.Collectors) FileNotFoundException(java.io.FileNotFoundException) SearchParameters(com.compomics.util.parameters.identification.search.SearchParameters) com.compomics.util.experiment.identification.matches(com.compomics.util.experiment.identification.matches) GuiUtilities(com.compomics.util.gui.GuiUtilities) DisplayParameters(eu.isas.peptideshaker.preferences.DisplayParameters) IdentificationParameters(com.compomics.util.parameters.identification.IdentificationParameters) ProteinSequencePanel(eu.isas.peptideshaker.gui.protein_sequence.ProteinSequencePanel) PSParameter(com.compomics.util.experiment.identification.peptide_shaker.PSParameter) CategoryPlot(org.jfree.chart.plot.CategoryPlot) ArrayUtil(com.compomics.util.ArrayUtil) Precursor(com.compomics.util.experiment.mass_spectrometry.spectra.Precursor) MatchValidationDialog(eu.isas.peptideshaker.gui.MatchValidationDialog) IntStream(java.util.stream.IntStream) java.util(java.util) SpectrumIdentificationAssumption(com.compomics.util.experiment.identification.SpectrumIdentificationAssumption) HelpDialog(com.compomics.util.gui.error_handlers.HelpDialog) ChromosomeTableCellRenderer(no.uib.jsparklines.extra.ChromosomeTableCellRenderer) PeptideUtils(com.compomics.util.experiment.identification.utils.PeptideUtils) NonSymmetricalNormalDistribution(com.compomics.util.math.statistics.distributions.NonSymmetricalNormalDistribution) PlotOrientation(org.jfree.chart.plot.PlotOrientation) TableModelListener(javax.swing.event.TableModelListener) XYPlottingDialog(com.compomics.util.gui.XYPlottingDialog) ModificationUtils(com.compomics.util.experiment.identification.utils.ModificationUtils) ProteinTableModel(eu.isas.peptideshaker.gui.tablemodels.ProteinTableModel) StringSelection(java.awt.datatransfer.StringSelection) PsmTableModel(eu.isas.peptideshaker.gui.tablemodels.PsmTableModel) Spectrum(com.compomics.util.experiment.mass_spectrometry.spectra.Spectrum) ProteinInferenceDialog(eu.isas.peptideshaker.gui.protein_inference.ProteinInferenceDialog) MatchValidationLevel(com.compomics.util.experiment.identification.validation.MatchValidationLevel) BufferedWriter(java.io.BufferedWriter) FileWriter(java.io.FileWriter) DecimalFormat(java.text.DecimalFormat) SequenceProvider(com.compomics.util.experiment.io.biology.protein.SequenceProvider) ExportFeature(com.compomics.util.io.export.ExportFeature) Identification(com.compomics.util.experiment.identification.Identification) ResidueAnnotation(eu.isas.peptideshaker.gui.protein_sequence.ResidueAnnotation) Peptide(com.compomics.util.experiment.biology.proteins.Peptide) ExportGraphicsDialog(com.compomics.util.gui.export.graphics.ExportGraphicsDialog) PSMaps(eu.isas.peptideshaker.scoring.PSMaps) AnnotationParameters(com.compomics.util.experiment.identification.spectrum_annotation.AnnotationParameters) MouseEvent(java.awt.event.MouseEvent) File(java.io.File) ChartChangeEvent(org.jfree.chart.event.ChartChangeEvent) PeptideSpectrumAnnotator(com.compomics.util.experiment.identification.spectrum_annotation.spectrum_annotators.PeptideSpectrumAnnotator) ExportFormat(com.compomics.util.io.export.ExportFormat) java.awt(java.awt) Charge(com.compomics.util.experiment.biology.ions.Charge) HtmlLinksRenderer(no.uib.jsparklines.extra.HtmlLinksRenderer) com.compomics.util.gui.spectrum(com.compomics.util.gui.spectrum) GeneDetailsDialog(com.compomics.util.gui.genes.GeneDetailsDialog) no.uib.jsparklines.renderers(no.uib.jsparklines.renderers) Range(org.jfree.data.Range) org.jfree.chart(org.jfree.chart) ChartChangeListener(org.jfree.chart.event.ChartChangeListener) ProgressDialogX(com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX) javax.swing(javax.swing) Identification(com.compomics.util.experiment.identification.Identification) TitledBorder(javax.swing.border.TitledBorder) SequenceProvider(com.compomics.util.experiment.io.biology.protein.SequenceProvider) SelfUpdatingTableModel(com.compomics.util.gui.tablemodels.SelfUpdatingTableModel) PeptideAssumption(com.compomics.util.experiment.identification.spectrum_assumptions.PeptideAssumption) Peptide(com.compomics.util.experiment.biology.proteins.Peptide)

Example 4 with PsmTableModel

use of eu.isas.peptideshaker.gui.tablemodels.PsmTableModel in project peptide-shaker by compomics.

the class OverviewPanel method updatePsmSelection.

/**
 * Update the PSM selection according to the currently selected peptide.
 *
 * @param row the row index of the selected peptide
 * @param forcePsmOrderUpdate if true, the sorted listed is recreated even
 * if not needed
 */
private void updatePsmSelection(int row, boolean forcePsmOrderUpdate) {
    if (row != -1) {
        this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
        Identification identification = peptideShakerGUI.getIdentification();
        IdentificationFeaturesGenerator identificationFeaturesGenerator = peptideShakerGUI.getIdentificationFeaturesGenerator();
        SelfUpdatingTableModel tableModel = (SelfUpdatingTableModel) peptideTable.getModel();
        int peptideIndex = tableModel.getViewIndex(row);
        long peptideKey = peptideKeys[peptideIndex];
        psmKeys = identificationFeaturesGenerator.getSortedPsmKeys(peptideKey, peptideShakerGUI.getUtilitiesUserParameters().getSortPsmsOnRt(), forcePsmOrderUpdate);
        // clear the selection in case more than one row was selected for the last peptide
        psmTable.clearSelection();
        // update the table model
        if (psmTable.getModel() instanceof PsmTableModel && ((PsmTableModel) psmTable.getModel()).isInstantiated()) {
            ((PsmTableModel) psmTable.getModel()).updateDataModel(identification, peptideShakerGUI.getDisplayFeaturesGenerator(), peptideShakerGUI.getIdentificationParameters(), psmKeys);
            ((PsmTableModel) psmTable.getModel()).setSelfUpdating(true);
            ((PsmTableModel) psmTable.getModel()).resetSorting(new ProgressDialogX(peptideShakerGUI, Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker.gif")), Toolkit.getDefaultToolkit().getImage(getClass().getResource("/icons/peptide-shaker-orange.gif")), true));
        } else {
            PsmTableModel psmTableModel = new PsmTableModel(identification, peptideShakerGUI.getDisplayFeaturesGenerator(), peptideShakerGUI.getSpectrumProvider(), peptideShakerGUI.getIdentificationParameters(), psmKeys, peptideShakerGUI.getDisplayParameters().showScores(), peptideShakerGUI.getExceptionHandler());
            psmTable.setModel(psmTableModel);
        }
        setPsmTableProperties();
        showSparkLines(peptideShakerGUI.showSparklines());
        int nValidatedPsms = identificationFeaturesGenerator.getNValidatedSpectraForPeptide(peptideKey);
        int nConfidentPsms = identificationFeaturesGenerator.getNConfidentSpectraForPeptide(peptideKey);
        int nPsms = psmTable.getRowCount();
        String title = PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "Peptide Spectrum Matches (";
        if (nConfidentPsms > 0) {
            title += nValidatedPsms + "/" + nPsms + " - " + nConfidentPsms + " confident, " + (nValidatedPsms - nConfidentPsms) + " doubtful";
        } else {
            title += nValidatedPsms + "/" + nPsms;
        }
        title += ")" + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING;
        ((TitledBorder) psmsPanel.getBorder()).setTitle(title);
        psmsPanel.repaint();
        updateSelection(true);
        newItemSelection();
        // update the sequence coverage map
        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                try {
                    int proteinIndex, selectedProteinRow = proteinTable.getSelectedRow();
                    if (selectedProteinRow != -1) {
                        SelfUpdatingTableModel proteinTableModel = (SelfUpdatingTableModel) proteinTable.getModel();
                        proteinIndex = proteinTableModel.getViewIndex(selectedProteinRow);
                    } else {
                        proteinIndex = 0;
                    }
                    long proteinKey = proteinKeys[proteinIndex];
                    ProteinMatch proteinMatch = peptideShakerGUI.getIdentification().getProteinMatch(proteinKey);
                    updateSequenceCoverage(proteinKey, proteinMatch.getLeadingAccession());
                } catch (Exception e) {
                    peptideShakerGUI.catchException(e);
                }
            }
        });
        this.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    }
}
Also used : PsmTableModel(eu.isas.peptideshaker.gui.tablemodels.PsmTableModel) IdentificationFeaturesGenerator(com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator) Identification(com.compomics.util.experiment.identification.Identification) TitledBorder(javax.swing.border.TitledBorder) FileNotFoundException(java.io.FileNotFoundException) ProgressDialogX(com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX) SelfUpdatingTableModel(com.compomics.util.gui.tablemodels.SelfUpdatingTableModel) java.awt(java.awt)

Aggregations

PsmTableModel (eu.isas.peptideshaker.gui.tablemodels.PsmTableModel)4 PeptideTableModel (eu.isas.peptideshaker.gui.tablemodels.PeptideTableModel)3 ProteinTableModel (eu.isas.peptideshaker.gui.tablemodels.ProteinTableModel)3 java.awt (java.awt)3 TitledBorder (javax.swing.border.TitledBorder)3 Identification (com.compomics.util.experiment.identification.Identification)2 IdentificationFeaturesGenerator (com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator)2 SelfUpdatingTableModel (com.compomics.util.gui.tablemodels.SelfUpdatingTableModel)2 ProgressDialogX (com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX)2 KeyEvent (java.awt.event.KeyEvent)2 MouseAdapter (java.awt.event.MouseAdapter)2 MouseEvent (java.awt.event.MouseEvent)2 FileNotFoundException (java.io.FileNotFoundException)2 javax.swing (javax.swing)2 JTableHeader (javax.swing.table.JTableHeader)2 ArrayUtil (com.compomics.util.ArrayUtil)1 Util (com.compomics.util.Util)1 BareBonesBrowserLaunch (com.compomics.util.examples.BareBonesBrowserLaunch)1 Charge (com.compomics.util.experiment.biology.ions.Charge)1 Peptide (com.compomics.util.experiment.biology.proteins.Peptide)1