- public JalviewStructureDisplayI viewStructures(AlignmentPanel ap,
- PDBEntry[] pr, SequenceI[][] collateForPDB)
+ /**
+ * View multiple PDB entries, each with associated sequences
+ *
+ * @param pdbs
+ * @param seqsForPdbs
+ * @param ap
+ * @return
+ */
+ public JalviewStructureDisplayI viewStructures(PDBEntry[] pdbs,
+ SequenceI[][] seqsForPdbs, AlignmentPanel ap)
+ {
+ JalviewStructureDisplayI viewer = onlyOnePdb(pdbs, seqsForPdbs, ap);
+ if (viewer != null)
+ {
+ return viewer;
+ }
+ return viewStructures(getViewerType(), pdbs, seqsForPdbs, ap);
+ }
+
+ /**
+ * A strictly temporary method pending JAL-1761 refactoring. Determines if all
+ * the passed PDB entries are the same (this is the case if selected sequences
+ * to view structure for are chains of the same structure). If so, calls the
+ * single-pdb version of viewStructures and returns the viewer, else returns
+ * null.
+ *
+ * @param pdbs
+ * @param seqsForPdbs
+ * @param ap
+ * @return
+ */
+ private JalviewStructureDisplayI onlyOnePdb(PDBEntry[] pdbs,
+ SequenceI[][] seqsForPdbs, AlignmentPanel ap)