JAL-3485 constants for CDNA_CONSENSUS, STRUCTURE_CONSENSUS added
[jalview.git] / src / jalview / renderer / AnnotationRenderer.java
index adca17e..1e2cf76 100644 (file)
@@ -35,6 +35,7 @@ import jalview.schemes.NucleotideColourScheme;
 import jalview.schemes.ResidueProperties;
 import jalview.schemes.ZappoColourScheme;
 import jalview.util.Platform;
+import jalview.viewmodel.AlignmentViewport.AutoAnnotation;
 
 import java.awt.BasicStroke;
 import java.awt.Color;
@@ -362,10 +363,13 @@ public class AnnotationRenderer
     // properties/rendering attributes as a global 'alignment group' which holds
     // all vis settings for the alignment as a whole rather than a subset
     //
-    if (aa.autoCalculated && (aa.label.startsWith("Consensus")
-            || aa.label.startsWith("cDNA Consensus")))
+    if (aa.autoCalculated
+            && (aa.label.startsWith(AutoAnnotation.CONSENSUS.label)
+                    || aa.label.startsWith(
+                            AutoAnnotation.CDNA_CONSENSUS.label)))
     {
-      boolean forComplement = aa.label.startsWith("cDNA Consensus");
+      boolean forComplement = aa.label
+              .startsWith(AutoAnnotation.CDNA_CONSENSUS.label);
       if (aa.groupRef != null && aa.groupRef.consensusData != null
               && aa.groupRef.isShowSequenceLogo())
       {
@@ -392,7 +396,8 @@ public class AnnotationRenderer
     }
     else
     {
-      if (aa.autoCalculated && aa.label.startsWith("StrucConsensus"))
+      if (aa.autoCalculated && aa.label
+              .startsWith(AutoAnnotation.STRUCTURE_CONSENSUS.label))
       {
         // TODO implement group structure consensus
         /*