selectedSequence = userSelectedSeq;
}
String pdbFilename = selectedPdbFileName;
-
+ // TODO - tidy up this ugly hack so we call launchStructureViewer too
StructureChooser.openStructureFileForSequence(ssm, sc, ap,
- selectedSequence, true, pdbFilename, tft, paeFilename,
- true);
+ selectedSequence, true, pdbFilename, tft, paeFilename,false,
+ true,false,getTargetedStructureViewer(ssm).getViewerType());
}
SwingUtilities.invokeLater(new Runnable()
{
paeFilename, false, true, doXferSettings, null);
}
+ /**
+ *
+ * @param ssm
+ * @param sc
+ * @param ap
+ * @param seq
+ * @param prompt
+ * @param sFilename
+ * @param tft
+ * @param paeFilename
+ * @param forceHeadless
+ * @param showRefAnnotations
+ * @param doXferSettings
+ * @param viewerType - when not null means the viewer will be opened, providing forceHeadless/headless is not true
+ * @return
+ */
public static StructureViewer openStructureFileForSequence(
StructureSelectionManager ssm, StructureChooser sc,
AlignmentPanel ap, SequenceI seq, boolean prompt,
ssm = ap.getStructureSelectionManager();
StructureSelectionManager.doConfigureStructurePrefs(ssm);
}
-
+
PDBEntry fileEntry = new AssociatePdbFileWithSeq().associatePdbWithSeq(
sFilename, DataSourceType.FILE, seq, prompt, Desktop.instance,
tft, paeFilename, doXferSettings);
sv = sc.launchStructureViewer(ssm, new PDBEntry[] { fileEntry }, ap,
new SequenceI[]
{ seq }, viewerType);
+ // foo
+ sv.getJalviewStructureDisplay().raiseViewer();
}
sc.mainFrame.dispose();
+ // TODO should honor preferences - only show reference annotation that is requested - JAL-4415 JAL-3124
if (showRefAnnotations)
{
showReferenceAnnotationsForSequence(ap.alignFrame, seq);