From: amwaterhouse <Andrew Waterhouse>
Date: Thu, 18 Jan 2007 16:15:22 +0000 (+0000)
Subject: Descriptions can be added to annotations
X-Git-Tag: Release_2_3~486
X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1b7d493c78a364ec44ba125554a09aa317e7ad2c;p=jalview.git

Descriptions can be added to annotations
---

diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java
index 1f5a7ad..749d2a7 100755
--- a/src/jalview/io/AnnotationFile.java
+++ b/src/jalview/io/AnnotationFile.java
@@ -50,6 +50,10 @@ public class AnnotationFile
     for(int i=0; i<annotations.length; i++)
     {
       row = annotations[i];
+
+      if(!row.visible)
+        continue;
+
       color = null;
 
       if( row.sequenceRef == null)
@@ -99,6 +103,8 @@ public class AnnotationFile
       }
 
       text.append(row.label+"\t");
+      if(row.description!=null)
+        text.append(row.description+"\t");
 
       for(int j=0; j<row.annotations.length; j++)
       {
@@ -264,7 +270,12 @@ public class AnnotationFile
 
 
         graphStyle = AlignmentAnnotation.getGraphValueFromString(token);
-        label = description = st.nextToken();
+        label = st.nextToken();
+
+        if(st.countTokens()>1)
+          description = st.nextToken();
+        else
+          description = null;
 
         line = st.nextToken();