JAL-1550 JAL-1551 formatting
[jalview.git] / src / jalview / schemes / RNAHelicesColour.java
index 57fcba5..76592ba 100644 (file)
  */
 package jalview.schemes;
 
-import java.awt.*;
-import java.util.Hashtable;
-import java.util.Map;
-
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AnnotatedCollectionI;
 import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceI;
 
+import java.awt.Color;
+import java.util.Hashtable;
+import java.util.Map;
+
 /**
  * Looks at the information computed from an RNA Stockholm format file on the
  * secondary structure of the alignment. Extracts the information on the
@@ -74,6 +74,19 @@ public class RNAHelicesColour extends ResidueColourScheme
     alignmentChanged(alignment, null);
   }
 
+  /**
+   * clones colour settings and annotation row data
+   * 
+   * @param rnaHelicesColour
+   */
+  public RNAHelicesColour(RNAHelicesColour rnaHelicesColour)
+  {
+    super(ResidueProperties.nucleotideIndex);
+    helixcolorhash = rnaHelicesColour.helixcolorhash;
+    annotation = rnaHelicesColour.annotation;
+    refresh();
+  }
+
   @Override
   public void alignmentChanged(AnnotatedCollectionI alignment,
           Map<SequenceI, SequenceCollectionI> hiddenReps)
@@ -193,4 +206,11 @@ public class RNAHelicesColour extends ResidueColourScheme
     // currentColour);
     return currentColour;
   }
+
+  @Override
+  public ColourSchemeI applyTo(AnnotatedCollectionI sg,
+          Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+  {
+    return new RNAHelicesColour(this);
+  }
 }