Dont write graph type twice
authoramwaterhouse <Andrew Waterhouse>
Fri, 7 Jul 2006 13:01:17 +0000 (13:01 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 7 Jul 2006 13:01:17 +0000 (13:01 +0000)
src/jalview/io/AnnotationFile.java

index e427605..801a9ab 100755 (executable)
@@ -63,17 +63,18 @@ public class AnnotationFile
       }\r
 \r
 \r
-      switch( row.graph )\r
+      if( row.graph == AlignmentAnnotation.NO_GRAPH)\r
       {\r
-        case AlignmentAnnotation.NO_GRAPH:\r
           text.append("NO_GRAPH\t");\r
-          break;\r
-        case AlignmentAnnotation.BAR_GRAPH:\r
+      }\r
+      else\r
+      {\r
+        if( row.graph == AlignmentAnnotation.BAR_GRAPH)\r
           text.append("BAR_GRAPH\t");\r
-        case AlignmentAnnotation.LINE_GRAPH:\r
+        else if(row.graph == AlignmentAnnotation.LINE_GRAPH)\r
           text.append("LINE_GRAPH\t");\r
 \r
-          if(row.getThreshold()!=null)\r
+        if(row.getThreshold()!=null)\r
             graphLine.append("GRAPHLINE\t"\r
                              + row.label + "\t"\r
                              + row.getThreshold().value + "\t"\r
@@ -321,8 +322,8 @@ public class AnnotationFile
       if(!parsedValue)\r
       {\r
         try{\r
-          value = new Float(token).floatValue();\r
           displayChar = token;\r
+          value = new Float(token).floatValue();\r
           parsedValue = true;\r
         }catch(NumberFormatException ex){}\r
       }\r
@@ -332,6 +333,7 @@ public class AnnotationFile
         // Either this character represents a helix or sheet\r
         // or an integer which can be displayed\r
         ss = token.charAt(0);\r
+        displayChar = "";\r
       }\r
       else if(desc.length()<1)\r
         desc = token;\r