paeFilename, false, true, doXferSettings, null);
}
- public static void openStructureFileForSequence(
+ public static StructureViewer openStructureFileForSequence(
StructureSelectionManager ssm, StructureChooser sc,
AlignmentPanel ap, SequenceI seq, boolean prompt,
String sFilename, TFType tft, String paeFilename,
boolean forceHeadless, boolean showRefAnnotations,
boolean doXferSettings, ViewerType viewerType)
{
+ StructureViewer sv = null;
boolean headless = forceHeadless;
if (sc == null)
{
sc = new StructureChooser(new SequenceI[] { seq }, seq, ap, false);
}
if (ssm == null)
+ {
ssm = ap.getStructureSelectionManager();
+ }
PDBEntry fileEntry = new AssociatePdbFileWithSeq().associatePdbWithSeq(
sFilename, DataSourceType.FILE, seq, prompt, Desktop.instance,
// if headless, "false" in the sc constructor above will avoid GUI behaviour
// in sc.launchStructureViewer()
if (!headless && !(viewerType == null))
- sc.launchStructureViewer(ssm, new PDBEntry[] { fileEntry }, ap,
+ {
+ sv = sc.launchStructureViewer(ssm, new PDBEntry[] { fileEntry }, ap,
new SequenceI[]
{ seq }, viewerType);
+ }
if (headless)
sc.mainFrame.dispose();
if (showRefAnnotations)
showReferenceAnnotationsForSequence(ap.alignFrame, seq);
+
+ return sv;
}
public static void showReferenceAnnotationsForSequence(AlignFrame af,