features = sq.getFeatures()
+ .getPositionalFeatures(labelClass);
+ for (SequenceFeature feature : features)
{
- if (sf[i].getType().equals(labelClass))
+ if (newname == null)
+ {
+ newname = feature.getDescription();
+ }
+ else
{
- if (newname==null)
- {
- newname = new String(sf[i].getDescription());
- } else {
- newname = newname + "; "+sf[i].getDescription();
- }
+ newname = newname + "; " + feature.getDescription();
}
}
}
- }
- if (newname!=null)
+ }
+ if (newname != null)
{
- String oldname = ((SequenceNode) node).getName();
- // TODO : save in the undo object for this modification.
+ // String oldname = ((SequenceNode) node).getName();
+ // TODO : save oldname in the undo object for this modification.
((SequenceNode) node).setName(newname);
}
}
}
});
}
+
+ /**
+ * Formats a localised title for the tree panel, like
+ *
+ * Neighbour Joining Using BLOSUM62
+ *
+ * For a tree loaded from file, just uses the file name
+ *
+ * @return
+ */
+ public String getPanelTitle() // to be moved/fixed
+ {
+ if (treeTitle != null)
+ {
+ return treeTitle;
+ }
+ else
+ {
+ /*
+ * i18n description of Neighbour Joining or Average Distance method
+ */
+ String treecalcnm = MessageManager
+ .getString("label.tree_calc_" + treeType.toLowerCase());
+
+ /*
+ * short score model name (long description can be too long)
+ */
+ String smn = substitutionMatrix;
+
+ /*
+ * put them together as Using
+ */
+ final String ttl = MessageManager
+ .formatMessage("label.treecalc_title", treecalcnm, smn);
+ return ttl;
+ }
+ }
}