for (final ScoreModelI sm : ScoreModels.getInstance().getModels())
{
final String name = sm.getName();
- // create an entry for this score matrix for use in PCA
- JCheckBoxMenuItem jm = new JCheckBoxMenuItem();
- jm.setText(MessageManager.getStringOrReturn("label.score_model_",
- name));
+ JCheckBoxMenuItem jm = new JCheckBoxMenuItem(name);
+
+ /*
+ * if the score model doesn't provide a description, try to look one
+ * up in the text bundle, falling back on its name
+ */
+ String tooltip = sm.getDescription();
+ if (tooltip == null)
+ {
+ tooltip = MessageManager.getStringOrReturn("label.score_model_",
+ name);
+ }
+ jm.setToolTipText(tooltip);
jm.setSelected(pcaModel.getScoreModelName().equals(name));
if ((pcaModel.isNucleotide() && sm.isDNA())
|| (!pcaModel.isNucleotide() && sm.isProtein()))