JAL-1894 update year/version in copyright
[jalview.git] / src / jalview / io / JSONFile.java
index 564dd64..9402562 100644 (file)
@@ -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<JSONObject> 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");