X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalview2XML.java;h=f3bc42e27fd3d0891a96d985054a8cbd5c610d77;hb=2b34ad8d6c224117ca2a3199c237fd74d8137da6;hp=a1a009de2b9c841c7f64c148da3c8ac431301575;hpb=3fd44a9b8f3e44b671ee26be26a8c1d541de3028;p=jalview.git diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index a1a009d..f3bc42e 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1,19 +1,21 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.gui; @@ -30,6 +32,7 @@ import javax.swing.*; import org.exolab.castor.xml.*; +import jalview.api.structures.JalviewStructureDisplayI; import jalview.bin.Cache; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; @@ -1793,7 +1796,7 @@ public class Jalview2XML try { // create list to store references for any new Jmol viewers created - newStructureViewers = new Vector(); + newStructureViewers = new Vector(); // UNMARSHALLER SEEMS TO CLOSE JARINPUTSTREAM, MOST ANNOYING // Workaround is to make sure caller implements the JarInputStreamProvider // interface @@ -1924,8 +1927,7 @@ public class Jalview2XML if (object.getJalviewModelSequence().getViewportCount() > 0) { af = _af; - if (object.getJalviewModelSequence().getViewportCount() > 1 - && af.viewport.gatherViewsHere) + if (af.viewport.gatherViewsHere) { gatherToThisFrame.put(af.viewport.getSequenceSetId(), af); } @@ -3131,10 +3133,11 @@ public class Jalview2XML @Override public void run() { - AppJmol sview = null; + JalviewStructureDisplayI sview = null; try { - sview = new AppJmol(pdbf, id, sq, alf.alignPanel, + // JAL-1333 note - we probably can't migrate Jmol views to UCSF Chimera! + sview = new StructureViewer(alf.alignPanel.getStructureSelectionManager()).createView(StructureViewer.Viewer.JMOL, pdbf, id, sq, alf.alignPanel, useinJmolsuperpos, usetoColourbyseq, jmolColouring, fileloc, rect, vid); addNewStructureViewer(sview); @@ -3210,15 +3213,18 @@ public class Jalview2XML /** * - * @param supported - minimum version we are comparing against - * @param version - version of data being processsed. + * @param supported + * - minimum version we are comparing against + * @param version + * - version of data being processsed. * @return true if version is development/null or evaluates to the same or * later X.Y.Z (where X,Y,Z are like [0-9]+b?[0-9]*) */ private boolean isVersionStringLaterThan(String supported, String version) { if (version == null || version.equalsIgnoreCase("DEVELOPMENT BUILD") - || version.equalsIgnoreCase("Test")) + || version.equalsIgnoreCase("Test") + || version.equalsIgnoreCase("AUTOMATED BUILD")) { System.err.println("Assuming project file with " + (version == null ? "null" : version) @@ -3261,13 +3267,13 @@ public class Jalview2XML return true; } - Vector newStructureViewers = null; + Vector newStructureViewers = null; - protected void addNewStructureViewer(AppJmol sview) + protected void addNewStructureViewer(JalviewStructureDisplayI sview) { if (newStructureViewers != null) { - sview.jmb.setFinishedLoadingFromArchive(false); + sview.getBinding().setFinishedLoadingFromArchive(false); newStructureViewers.add(sview); } } @@ -3276,9 +3282,9 @@ public class Jalview2XML { if (newStructureViewers != null) { - for (AppJmol sview : newStructureViewers) + for (JalviewStructureDisplayI sview : newStructureViewers) { - sview.jmb.setFinishedLoadingFromArchive(true); + sview.getBinding().setFinishedLoadingFromArchive(true); } newStructureViewers.clear(); newStructureViewers = null;