All or nothing drawing display char
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index ae3c5f9..7f6b08a 100755 (executable)
@@ -139,6 +139,8 @@ public class AlignmentAnnotation
         this.annotations = annotations;\r
         graph = graphType;\r
 \r
+        boolean drawValues = true;\r
+\r
         if (min == max)\r
         {\r
             min = 999999999;\r
@@ -149,6 +151,11 @@ public class AlignmentAnnotation
                     continue;\r
                 }\r
 \r
+                if(drawValues && annotations[i].displayCharacter.length() > 1 )\r
+                {\r
+                  drawValues = false;\r
+                }\r
+\r
                 if (annotations[i].value > max)\r
                 {\r
                     max = annotations[i].value;\r
@@ -161,6 +168,15 @@ public class AlignmentAnnotation
             }\r
         }\r
 \r
+        if(!drawValues)\r
+        {\r
+          for (int i = 0; i < annotations.length; i++)\r
+          {\r
+            if (annotations[i] != null)\r
+              annotations[i].displayCharacter = "";\r
+          }\r
+        }\r
+\r
         graphMin = min;\r
         graphMax = max;\r
 \r