+ @Override
+ protected void scoreMatrix_menuSelected()
+ {
+ scoreMatrixMenu.removeAll();
+ for (final String sm:ResidueProperties.scoreMatrices.keySet())
+ {
+ if (ResidueProperties.getScoreMatrix(sm) != null)
+ {
+ // create an entry for this score matrix for use in PCA
+ JCheckBoxMenuItem jm = new JCheckBoxMenuItem();
+ jm.setText(MessageManager
+ .getStringOrReturn("label.score_model", sm));
+ jm.setSelected(pcaModel.getScore_matrix().equals(sm));
+ if ((ResidueProperties.scoreMatrices.get(sm).isDNA() && ResidueProperties.scoreMatrices
+ .get(sm).isProtein())
+ || pcaModel.isNucleotide() == ResidueProperties.scoreMatrices
+ .get(sm).isDNA())
+ {
+ final PCAPanel us = this;
+ jm.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ if (!pcaModel.getScore_matrix().equals((String) sm))
+ {
+ pcaModel.setScore_matrix((String) sm);
+ Thread worker = new Thread(us);
+ worker.start();
+ }
+ }
+ });
+ scoreMatrixMenu.add(jm);
+ }
+ }
+ }
+ }