ssm = structureSelectionManager;
}
+ /**
+ * Factory to create a proxy for modifying existing structure viewer
+ *
+ */
+ public static StructureViewer reconfigure(
+ JalviewStructureDisplayI display)
+ {
+ StructureViewer sv = new StructureViewer(display.getBinding().getSsm());
+ sv.sview = display;
+ return sv;
+ }
public ViewerType getViewerType()
{
String viewType = Cache.getDefault(Preferences.STRUCTURE_DISPLAY,
new PDBEntry[seqsForPdbs.size()]);
SequenceI[][] theSeqs = seqsForPdbs.values().toArray(
new SequenceI[seqsForPdbs.size()][]);
+ if (sview != null)
+ {
+ new Thread(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+
+ for (int pdbep = 0; pdbep < pdbsForFile.length; pdbep++)
+ {
+ PDBEntry pdb = pdbsForFile[pdbep];
+ if (!sview.addAlreadyLoadedFile(theSeqs[pdbep], null, ap,
+ pdb.getId()))
+ {
+ sview.addToExistingViewer(pdb, theSeqs[pdbep], null, ap,
+ pdb.getId());
+ }
+ }
+
+ sview.updateTitleAndMenus();
+ }
+ }).start();
+ return sview;
+ }
if (viewerType.equals(ViewerType.JMOL))
{
public JalviewStructureDisplayI viewStructures(PDBEntry pdb,
SequenceI[] seqsForPdb, AlignmentPanel ap)
{
+ if (sview != null)
+ {
+ if (!sview.addAlreadyLoadedFile(seqsForPdb, null, ap, pdb.getId()))
+ {
+ sview.addToExistingViewer(pdb, seqsForPdb, null, ap, pdb.getId());
+ }
+ sview.updateTitleAndMenus();
+ return sview;
+ }
ViewerType viewerType = getViewerType();
if (viewerType.equals(ViewerType.JMOL))
{