X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAnnotationFile.java;h=ad3b630d499a22542ae1cfdd43f069d73d8dc158;hb=refs%2Fheads%2Ffeatures%2FJAL-2094_colourInterface;hp=8b3aa9832999c72ae0c5dc0f5bcdb4054f07594f;hpb=4d7f98a6dd54d9863ba449ec79dcd95d25ed863d;p=jalview.git diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index 8b3aa98..ad3b630 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -30,6 +30,7 @@ import jalview.datamodel.GraphLine; import jalview.datamodel.HiddenSequences; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; +import jalview.schemes.Colour; import jalview.schemes.ColourSchemeI; import jalview.schemes.ColourSchemeProperty; import jalview.schemes.ResidueProperties; @@ -1670,11 +1671,13 @@ public class AnnotationFile } else if (key.equalsIgnoreCase("textCol1")) { - sg.textColour = new UserColourScheme(value).findColour('A'); + sg.textColour = new Colour( + new UserColourScheme(value).findColour('A')); } else if (key.equalsIgnoreCase("textCol2")) { - sg.textColour2 = new UserColourScheme(value).findColour('A'); + sg.textColour2 = new Colour( + new UserColourScheme(value).findColour('A')); } else if (key.equalsIgnoreCase("textColThreshold")) { @@ -1760,6 +1763,10 @@ public class AnnotationFile */ public String printCSVAnnotations(AlignmentAnnotation[] annotations) { + if (annotations == null) + { + return ""; + } StringBuffer sp = new StringBuffer(); for (int i = 0; i < annotations.length; i++) {