label.edit_name_and_description_current_group = Edit name and description of current group.\r
label.view_structure_for = View structure for {0}\r
label.view_all_structures = View all {0} structures.\r
+label.view_all_representative_structures = View all {0} representative structures.\r
label.associate_structure_with_sequence = Associate Structure with Sequence\r
label.from_file = from file\r
label.enter_pdb_id = Enter PDB Id\r
buildGroupURLMenu(sg, groupLinks);
}
// Add a 'show all structures' for the current selection
- Hashtable<String, PDBEntry> pdbe = new Hashtable<String, PDBEntry>();
+ Hashtable<String, PDBEntry> pdbe = new Hashtable<String, PDBEntry>(),reppdb=new Hashtable<String,PDBEntry>();
SequenceI sqass = null;
for (SequenceI sq : ap.av.getSequenceSelection())
{
.getPDBId();
if (pes != null)
{
+ reppdb.put(pes.get(0).getId(),pes.get(0));
for (PDBEntry pe : pes)
{
pdbe.put(pe.getId(), pe);
if (pdbe.size() > 0)
{
final PDBEntry[] pe = pdbe.values().toArray(
- new PDBEntry[pdbe.size()]);
- final JMenuItem gpdbview;
+ new PDBEntry[pdbe.size()]),pr = reppdb.values().toArray(
+ new PDBEntry[reppdb.size()]);
+ final JMenuItem gpdbview,rpdbview;
if (pdbe.size() == 1)
{
structureMenu.add(gpdbview = new JMenuItem(MessageManager.formatMessage("label.view_structure_for", new String[]{sqass.getDisplayId(false)})));\r
}
else
{
- structureMenu.add(gpdbview = new JMenuItem(MessageManager.formatMessage("label.view_all_structures", new String[]{new Integer(pdbe.size()).toString()})));\r
+ structureMenu.add(gpdbview = new JMenuItem(MessageManager.formatMessage("label.view_all_structures", new String[]{new Integer(pdbe.size()).toString()}))); \r
}
gpdbview.setToolTipText(MessageManager.getString("label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment"));\r
gpdbview.addActionListener(new ActionListener()
new AppJmol(ap, pe, ap.av.collateForPDB(pe));
}
});
+ if (reppdb.size()>1 && reppdb.size()<pdbe.size())
+ {
+ structureMenu.add(rpdbview = new JMenuItem(MessageManager.formatMessage("label.view_all_representative_structures", new String[]{new Integer(reppdb.size()).toString()})));
+ rpdbview.setToolTipText(MessageManager.getString("label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment"));
+ rpdbview.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ new AppJmol(ap, pr, ap.av.collateForPDB(pr));
+ }
+ });
+ }
}
}
else