3 import javax.swing.JOptionPane;
5 import jalview.datamodel.PDBEntry;
6 import jalview.datamodel.Sequence;
7 import jalview.datamodel.SequenceI;
10 * GUI related routines for associating PDB files with sequences
14 public class AssociatePdbFileWithSeq
18 * assocate the given PDB file with
22 public PDBEntry associatePdbWithSeq(String choice, String protocol, SequenceI sequence, boolean prompt)
24 PDBEntry entry = new PDBEntry();
27 MCview.PDBfile pdbfile = new MCview.PDBfile(choice,
30 if (pdbfile.id == null)
34 if (prompt) { reply = JOptionPane
35 .showInternalInputDialog(
37 "Couldn't find a PDB id in the file supplied."
38 + "Please enter an Id to identify this structure.",
39 "No PDB Id in File", JOptionPane.QUESTION_MESSAGE);}
49 entry.setId(pdbfile.id);
51 } catch (java.io.IOException ex)
56 entry.setFile(choice);
57 sequence.getDatasetSequence().addPDBId(entry);