for (ChimeraViewFrame topView : existingViews)
{
// TODO: highlight topView in view somehow
+ /*
+ * JAL-1742 exclude view with this structure already mapped (don't offer
+ * to align chain B to chain A of the same structure)
+ */
+ if (topView.hasPdbId(pdbentry.getId()))
+ {
+ continue;
+ }
int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
MessageManager.formatMessage("label.add_pdbentry_to_view",
new Object[]
{ seq });
}
+ protected boolean hasPdbId(String pdbId)
+ {
+ return jmb.hasPdbId(pdbId);
+ }
+
private void openNewChimera(AlignmentPanel ap, PDBEntry[] pdbentrys,
SequenceI[][] seqs)
{
}
/**
+ * Answers true if this binding includes the given PDB id, else false
+ *
+ * @param pdbId
+ * @return
+ */
+ public boolean hasPdbId(String pdbId)
+ {
+ if (pdbEntry != null)
+ {
+ for (PDBEntry pdb : pdbEntry)
+ {
+ if (pdb.getId().equals(pdbId))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
* Returns the number of modelled PDB file entries.
*
* @return