- * If the options above are declined or do not apply, open a new viewer
- */
- openNewChimera(ap, new PDBEntry[]
- { pdbentry }, new SequenceI[][]
- { seq });
- }
-
- /**
- * Presents a dialog with the option to add an align a structure to an
- * existing Chimera view
- *
- * @param pdbId
- * @param view
- * @return YES, NO or CANCEL JOptionPane code
- */
- protected int chooseAlignStructureToViewer(String pdbId,
- ChimeraViewFrame view)
- {
- int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- MessageManager.formatMessage("label.add_pdbentry_to_view",
- new Object[]
- { pdbId, view.getTitle() }), MessageManager
- .getString("label.align_to_existing_structure_view"),
- JOptionPane.YES_NO_CANCEL_OPTION);
- return option;
- }
-
- /**
- * Presents a dialog with the option to add sequences to a viewer which
- * already has their structure open
- *
- * @param pdbId
- * @return YES, NO or CANCEL JOptionPane code
- */
- protected int chooseAddSequencesToViewer(String pdbId)
- {
- int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- MessageManager.formatMessage(
- "label.pdb_entry_is_already_displayed", new Object[]
- { pdbId }), MessageManager.formatMessage(
- "label.map_sequences_to_visible_window", new Object[]
- { pdbId }), JOptionPane.YES_NO_CANCEL_OPTION);
- return option;
- }
-
- /**
- * Adds mappings for the given sequences to an already opened PDB structure,
- * and updates any viewers that have the PDB file
- *
- * @param seq
- * @param chains
- * @param ap
- * @param pdbFilename
- */
- protected void addSequenceMappingsToStructure(SequenceI[] seq,
- String[] chains, final AlignmentPanel ap, String pdbFilename)
- {
- // TODO : Fix multiple seq to one chain issue here.
- /*
- * create the mappings
- */
- ap.getStructureSelectionManager().setMapping(seq, chains, pdbFilename,
- AppletFormatAdapter.FILE);
-
- /*
- * alert the FeatureRenderer to show new (PDB RESNUM) features