From: Jim Procter Date: Thu, 3 Sep 2015 20:20:13 +0000 (+0100) Subject: JAL-1233 JAL-1576 copy constructor to propagate helix colours and applyTo implementat... X-Git-Tag: Release_2_10_0~503 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d131f05c68757d57e5e4a1f440196ae1b70f3b8a;p=jalview.git JAL-1233 JAL-1576 copy constructor to propagate helix colours and applyTo implementation to clone colour scheme to subgroups --- 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); + } }