label.principal_component_analysis = Principal Component Analysis\r
label.average_distance_identity = Average Distance Using % Identity\r
label.neighbour_joining_identity = Neighbour Joining Using % Identity\r
+label.treecalc_title = {0} Using {1}\r
+label.tree_calc_av = Average Distance\r
+label.tree_calc_nj = Neighbour Joining\r
+label.select_score_model = Select score model\r
+label.score_model_pid = % Identity\r
+label.score_model_blosum62 = BLOSUM62\r
+label.score_model_pam250 = PAM 250\r
+label.score_model_conservation = Physicochemical property conservation\r
+label.score_model_enhconservation = Physicochemical property conservation\r
label.status_bar = Status bar\r
label.out_to_textbox = Output to Textbox\r
label.clustalx = Clustalx\r
{
calculateTree.removeAll();
// build the calculate menu
+
for (final String type:new String[] {"NJ", "AV"})
{
+ String treecalcnm = MessageManager.getString("label.tree_calc_"+type.toLowerCase());
for (final Object pwtype: ResidueProperties.scoreMatrices.keySet())
{
JMenuItem tm = new JMenuItem();
ScoreModelI sm = ResidueProperties.scoreMatrices.get(pwtype);
- final String title="Calculate "+type+" using "+sm.getName();
- tm.setText(title);// MessageManager.getString("label.neighbour_blosum62"));
- tm
- .addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- NewTreePanel(type, (String) pwtype, title);
- }
- });
- calculateTree.add(tm);
+ if (sm.isProtein()==!viewport.getAlignment().isNucleotide())
+ {
+ String smn = MessageManager.getStringOrReturn(
+ "label.score_model_", sm.getName());
+ final String title = MessageManager.formatMessage(
+ "label.treecalc_title", treecalcnm, smn);
+ tm.setText(title);//
+ tm.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ NewTreePanel(type, (String) pwtype, title);
+ }
+ });
+ calculateTree.add(tm);
+ }
}
}