From d131f05c68757d57e5e4a1f440196ae1b70f3b8a Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 3 Sep 2015 21:20:13 +0100 Subject: [PATCH] JAL-1233 JAL-1576 copy constructor to propagate helix colours and applyTo implementation to clone colour scheme to subgroups --- src/jalview/schemes/RNAHelicesColour.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/jalview/schemes/RNAHelicesColour.java b/src/jalview/schemes/RNAHelicesColour.java index 57fcba5..2beb4cf 100644 --- a/src/jalview/schemes/RNAHelicesColour.java +++ b/src/jalview/schemes/RNAHelicesColour.java @@ -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 hiddenReps) @@ -193,4 +206,11 @@ public class RNAHelicesColour extends ResidueColourScheme // currentColour); return currentColour; } + + @Override + public ColourSchemeI applyTo(AnnotatedCollectionI sg, + Map hiddenRepSequences) + { + return new RNAHelicesColour(this); + } } -- 1.7.10.2