JAL-4375 Add an AnnotationColouringI interface, and generic AnnotationColouringRanges...
[jalview.git] / src / jalview / datamodel / Annotation.java
index f6919cd..996015c 100755 (executable)
@@ -22,6 +22,8 @@ package jalview.datamodel;
 
 import java.awt.Color;
 
+import jalview.datamodel.annotations.AnnotationColouringI;
+
 /**
  * Holds all annotation values for a position in an AlignmentAnnotation row
  * 
@@ -60,6 +62,11 @@ public class Annotation
   public Color colour;
 
   /**
+   * link back to the AnnotationRowBuilder
+   */
+  private AnnotationColouringI annotationColouring = null;
+
+  /**
    * Creates a new Annotation object.
    * 
    * @param displayChar
@@ -125,7 +132,7 @@ public class Annotation
     secondaryStructure = that.secondaryStructure;
     value = that.value;
     colour = that.colour;
-
+    annotationColouring = that.getAnnotationColouring();
   }
 
   /**
@@ -217,4 +224,14 @@ public class Annotation
             && (secondaryStructure == '\0' || (secondaryStructure == ' '))
             && colour == null);
   }
+
+  public void setAnnotationColouring(AnnotationColouringI a)
+  {
+    this.annotationColouring = a;
+  }
+
+  public AnnotationColouringI getAnnotationColouring()
+  {
+    return annotationColouring;
+  }
 }