try {
PSPtmScores scores = new PSPtmScores();
scores = (PSPtmScores) peptideMatch.getUrParam(scores);
ArrayList<com.compomics.util.gui.protein.ModificationProfile> profiles = getModificationProfile(peptideMatch.getTheoreticPeptide(), scores);
SequenceModificationPanel sequenceModificationPanel
= new SequenceModificationPanel(peptideMatch.getTheoreticPeptide().getNTerminal() + "-"
+ peptideMatch.getTheoreticPeptide().getSequence()
+ "-" + peptideMatch.getTheoreticPeptide().getCTerminal(),
profiles, true, "D-score",
peptideShakerGUI.getPtmScoringPreferences().getSelectedProbabilisticScore().getName());
if (selectedPeptideProfile) {
modificationProfileSelectedPeptideJPanel.removeAll();
sequenceModificationPanel.setOpaque(true);
sequenceModificationPanel.setBackground(Color.WHITE);
sequenceModificationPanel.setMinimumSize(new Dimension(sequenceModificationPanel.getPreferredSize().width, sequenceModificationPanel.getHeight()));
JPanel tempPanel = new JPanel();
tempPanel.setBackground(Color.WHITE);
tempPanel.setOpaque(true);
modificationProfileSelectedPeptideJPanel.add(tempPanel);
modificationProfileSelectedPeptideJPanel.add(sequenceModificationPanel);
modificationProfileSelectedPeptideJPanel.revalidate();
modificationProfileSelectedPeptideJPanel.repaint();
} else {
modificationProfileRelatedPeptideJPanel.removeAll();
sequenceModificationPanel.setOpaque(true);
sequenceModificationPanel.setBackground(Color.WHITE);
sequenceModificationPanel.setMinimumSize(new Dimension(sequenceModificationPanel.getPreferredSize().width, sequenceModificationPanel.getHeight()));
JPanel tempPanel = new JPanel();
tempPanel.setBackground(Color.WHITE);
tempPanel.setOpaque(true);
modificationProfileRelatedPeptideJPanel.add(tempPanel);
modificationProfileRelatedPeptideJPanel.add(sequenceModificationPanel);
modificationProfileRelatedPeptideJPanel.revalidate();
modificationProfileRelatedPeptideJPanel.repaint();
}
double selectedPeptideProfileWidth = 1 - (sequenceModificationPanel.getPreferredSize().getWidth() / selectedPeptidesJSplitPane.getSize().getWidth());
double relatedPeptideProfileWidth = 1 - (sequenceModificationPanel.getPreferredSize().getWidth() / relatedPeptidesJSplitPane.getSize().getWidth());
if (modificationProfileSelectedPeptideJPanel.getComponentCount() == 2) {
selectedPeptideProfileWidth = 1 - (modificationProfileSelectedPeptideJPanel.getComponent(1).getPreferredSize().getWidth() / selectedPeptidesJSplitPane.getSize().getWidth());
}