graph now has type, not a boolean
authoramwaterhouse <Andrew Waterhouse>
Thu, 22 Dec 2005 15:59:52 +0000 (15:59 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 22 Dec 2005 15:59:52 +0000 (15:59 +0000)
src/jalview/datamodel/AlignmentAnnotation.java

index 9cfdff6..e4d64fa 100755 (executable)
@@ -36,8 +36,6 @@ public class AlignmentAnnotation
     /** DOCUMENT ME!! */\r
     public Annotation[] annotations;\r
 \r
-    /** DOCUMENT ME!! */\r
-    public boolean isGraph = false;\r
 \r
     /** DOCUMENT ME!! */\r
     public float graphMin;\r
@@ -45,8 +43,6 @@ public class AlignmentAnnotation
     /** DOCUMENT ME!! */\r
     public float graphMax;\r
 \r
-    /** DOCUMENT ME!! */\r
-    public int windowLength;\r
 \r
     // Graphical hints and tips\r
 \r
@@ -65,6 +61,14 @@ public class AlignmentAnnotation
     /** DOCUMENT ME!! */\r
     public int height = 0;\r
 \r
+    public int graph = 0;\r
+\r
+    public static int NO_GRAPH = 0;\r
+\r
+    public static int BAR_GRAPH = 1;\r
+\r
+    public static int LINE_GRAPH = 2;\r
+\r
     /**\r
      * Creates a new AlignmentAnnotation object.\r
      *\r
@@ -109,13 +113,13 @@ public class AlignmentAnnotation
      * @param winLength DOCUMENT ME!\r
      */\r
     public AlignmentAnnotation(String label, String description,\r
-        Annotation[] annotations, float min, float max, int winLength)\r
+        Annotation[] annotations, float min, float max, int graphType)\r
     {\r
         // graphs are not editable\r
         this.label = label;\r
         this.description = description;\r
         this.annotations = annotations;\r
-        isGraph = true;\r
+        graph = graphType;\r
 \r
         if (min == max)\r
         {\r
@@ -140,7 +144,6 @@ public class AlignmentAnnotation
 \r
         graphMin = min;\r
         graphMax = max;\r
-        windowLength = winLength;\r
 \r
         for (int i = 0; i < annotations.length; i++)\r
         {\r
@@ -172,7 +175,7 @@ public class AlignmentAnnotation
         {\r
             if (annotations[i] != null)\r
             {\r
-                if (isGraph)\r
+                if (graph!=0)\r
                 {\r
                     buffer.append(annotations[i].value);\r
                 }\r