toString modified
authoramwaterhouse <Andrew Waterhouse>
Thu, 26 May 2005 09:51:43 +0000 (09:51 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 26 May 2005 09:51:43 +0000 (09:51 +0000)
src/jalview/datamodel/AlignmentAnnotation.java

index 8326c3a..7b558c3 100755 (executable)
@@ -75,9 +75,28 @@ public class AlignmentAnnotation
     StringBuffer buffer = new StringBuffer();\r
     for(int i=0; i<annotations.length; i++)\r
    {\r
-     buffer.append( annotations[i].value );\r
+     if(annotations[i]!=null)\r
+     {\r
+       if(isGraph)\r
+         buffer.append(annotations[i].value);\r
+       else if(hasIcons)\r
+         buffer.append(annotations[i].secondaryStructure);\r
+       else\r
+         buffer.append(annotations[i].displayCharacter);\r
+\r
+     }\r
      buffer.append(", ");\r
    }\r
+   if(label.equals("Consensus"))\r
+   {\r
+     buffer.append("\n");\r
+     for (int i = 0; i < annotations.length; i++)\r
+     {\r
+       if (annotations[i] != null)\r
+           buffer.append(annotations[i].description);\r
+       buffer.append(", ");\r
+     }\r
+   }\r
    return buffer.toString();\r
   }\r
 \r