X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalview2XML.java;h=fc96edcbcd908e6ca8f9ecd0a12c574ee5f45705;hb=d9b79c023346253c10dc907d1e75f509823266c4;hp=2f90e915ec479326cb93ceef877de0b45f44a39f;hpb=4316d4573368e1c5455f84c6fcb96aa3a1e48045;p=jalview.git diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 2f90e91..fc96edc 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1092,15 +1092,26 @@ public class Jalview2XML view.setViewName(av.viewName); view.setGatheredViews(av.isGatherViewsHere()); - Rectangle position = ap.av.getExplodedGeometry(); - if (position == null) + Rectangle size = ap.av.getExplodedGeometry(); + Rectangle position = size; + if (size == null) { - position = ap.alignFrame.getBounds(); + size = ap.alignFrame.getBounds(); + if (av.getCodingComplement() != null) + { + position = ((SplitFrame) ap.alignFrame.getSplitViewContainer()) + .getBounds(); + } + else + { + position = size; + } } view.setXpos(position.x); view.setYpos(position.y); - view.setWidth(position.width); - view.setHeight(position.height); + + view.setWidth(size.width); + view.setHeight(size.height); view.setStartRes(av.startRes); view.setStartSeq(av.startSeq); @@ -1854,8 +1865,8 @@ public class Jalview2XML } } throw new Error(MessageManager.formatMessage( - "error.unsupported_version_calcIdparam", new Object[] - { calcIdParam.toString() })); + "error.unsupported_version_calcIdparam", + new Object[] { calcIdParam.toString() })); } /** @@ -1937,16 +1948,16 @@ public class Jalview2XML if (jds.getDatasetSequence() != null) { vamsasSeq.setDsseqid(seqHash(jds.getDatasetSequence())); - if (jds.getDatasetSequence().getDBRef() != null) + if (jds.getDatasetSequence().getDBRefs() != null) { - dbrefs = jds.getDatasetSequence().getDBRef(); + dbrefs = jds.getDatasetSequence().getDBRefs(); } } else { vamsasSeq.setDsseqid(id); // so we can tell which sequences really are // dataset sequences only - dbrefs = jds.getDBRef(); + dbrefs = jds.getDBRefs(); } if (dbrefs != null) { @@ -2453,6 +2464,11 @@ public class Jalview2XML int width = (int) dnaFrame.getBounds().getWidth(); int height = (int) (dnaFrame.getBounds().getHeight() + proteinFrame.getBounds().getHeight() + 50); + + /* + * SplitFrame location is saved to both enclosed frames + */ + splitFrame.setLocation(dnaFrame.getX(), dnaFrame.getY()); Desktop.addInternalFrame(splitFrame, title, width, height); /* @@ -2839,8 +2855,8 @@ public class Jalview2XML else { // defer to later - frefedSequence.add(new Object[] - { maps[m].getDnasq(), cf, mapping }); + frefedSequence.add(new Object[] { maps[m].getDnasq(), cf, + mapping }); } } } @@ -3250,8 +3266,8 @@ public class Jalview2XML * indicate that annotation colours are applied across all groups (pre * Jalview 2.8.1 behaviour) */ - boolean doGroupAnnColour = isVersionStringLaterThan("2.8.1", - object.getVersion()); + boolean doGroupAnnColour = Jalview2XML.isVersionStringLaterThan( + "2.8.1", object.getVersion()); AlignmentPanel ap = null; boolean isnewview = true; @@ -4037,7 +4053,7 @@ public class Jalview2XML * @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]*) */ - protected boolean isVersionStringLaterThan(String supported, + public static boolean isVersionStringLaterThan(String supported, String version) { if (version == null || version.equalsIgnoreCase("DEVELOPMENT BUILD") @@ -4060,11 +4076,18 @@ public class Jalview2XML String fileT = fileV.nextToken().toLowerCase().replace('b', '.'); try { - if (Float.valueOf(curT) > Float.valueOf(fileT)) + float supportedVersionToken = Float.parseFloat(curT); + float myVersiontoken = Float.parseFloat(fileT); + if (supportedVersionToken > myVersiontoken) { // current version is newer than the version that wrote the file return false; } + if (supportedVersionToken < myVersiontoken) + { + // current version is older than the version that wrote the file + return true; + } } catch (NumberFormatException nfe) { System.err @@ -4583,8 +4606,8 @@ public class Jalview2XML /** * Kludge for magic autoannotation names (see JAL-811) */ - String[] magicNames = new String[] - { "Consensus", "Quality", "Conservation" }; + String[] magicNames = new String[] { "Consensus", "Quality", + "Conservation" }; JvAnnotRow nullAnnot = new JvAnnotRow(-1, null); Hashtable visan = new Hashtable(); for (String nm : magicNames) @@ -4994,8 +5017,7 @@ public class Jalview2XML } else { - frefedSequence.add(new Object[] - { dsfor, jmap }); + frefedSequence.add(new Object[] { dsfor, jmap }); } } else