X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FJSONFile.java;h=9402562897a29f2b82022ccff009204041dd8cd3;hb=838e4f91d4a53dd315640dbc9ff6ef7a815ee576;hp=564dd64acbda10883a0b406af49b561469fbce7f;hpb=1b64bc7c6e51618b6a9acbbad423244d89eba203;p=jalview.git diff --git a/src/jalview/io/JSONFile.java b/src/jalview/io/JSONFile.java index 564dd64..9402562 100644 --- a/src/jalview/io/JSONFile.java +++ b/src/jalview/io/JSONFile.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -482,7 +482,6 @@ public class JSONFile extends AlignFile implements ComplexAlignFile seqMap.put(seqUniqueId, seq); } - parseFeatures(jsonSeqArray); for (Iterator seqGrpIter = seqGrpJsonArray.iterator(); seqGrpIter @@ -521,8 +520,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile } } SequenceGroup seqGrp = new SequenceGroup(grpSeqs, grpName, null, - displayBoxes, displayText, colourText, - startRes, endRes); + displayBoxes, displayText, colourText, startRes, endRes); seqGrp.cs = ColourSchemeMapper.getJalviewColourScheme(colourScheme, seqGrp); seqGrp.setShowNonconserved(showNonconserved); @@ -558,11 +556,14 @@ public class JSONFile extends AlignFile implements ComplexAlignFile .get("secondaryStructure").toString().charAt(0); String displayChar = annot.get("displayCharacter") == null ? "" : annot.get("displayCharacter").toString(); - Color color = annot.get("colour") == null ? Color.white - : UserColourScheme.getColourFromString(annot.get( - "colour").toString()); - annotations[count] = new Annotation(displayChar, desc, ss, val, - color); + + annotations[count] = new Annotation(displayChar, desc, ss, val); + if (annot.get("colour") != null) + { + Color color = UserColourScheme.getColourFromString(annot.get( + "colour").toString()); + annotations[count].colour = color; + } } ++count; } @@ -571,8 +572,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile .get("label").toString(), alAnnot.get("description") .toString(), annotations); alignAnnot.graph = (alAnnot.get("graphType") == null) ? 0 : Integer - .valueOf(alAnnot.get("graphType") - .toString()); + .valueOf(alAnnot.get("graphType").toString()); JSONObject diplaySettings = (JSONObject) alAnnot .get("annotationSettings");