}
/**
+ * Copy constructor
+ */
+ public ResidueShader(ResidueShader rs)
+ {
+ this.colourScheme = rs.colourScheme;
+ this.consensus = rs.consensus;
+ this.conservation = rs.conservation;
+ this.conservationColouring = rs.conservationColouring;
+ this.conservationIncrement = rs.conservationIncrement;
+ this.ignoreGaps = rs.ignoreGaps;
+ this.pidThreshold = rs.pidThreshold;
+ }
+
+ /**
* @see jalview.renderer.ResidueShaderI#setConsensus(jalview.datamodel.ProfilesI)
*/
@Override
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
+import jalview.analysis.Conservation;
import jalview.schemes.NucleotideColourScheme;
import jalview.schemes.PIDColourScheme;
import java.awt.Color;
+import java.util.Collections;
import junit.extensions.PA;
sg.setName("g1");
sg.setDescription("desc");
sg.setColourScheme(new PIDColourScheme());
+ Conservation cons = new Conservation("Cons", 2,
+ Collections.<SequenceI> emptyList(), 3, 12);
+ PA.setValue(cons, "consSequence", new Sequence("s", "abc"));
+ sg.getGroupColourScheme().setConservation(cons);
+ sg.getGroupColourScheme().setConsensus(new Profiles(null));
sg.setDisplayBoxes(false);
sg.setDisplayText(false);
sg.setColourText(true);
SequenceGroup sg2 = new SequenceGroup(sg);
assertEquals(sg2.getName(), sg.getName());
assertEquals(sg2.getDescription(), sg.getDescription());
- assertSame(sg2.getGroupColourScheme(), sg.getGroupColourScheme());
+ assertNotSame(sg2.getGroupColourScheme(), sg.getGroupColourScheme());
assertSame(sg2.getColourScheme(), sg.getColourScheme());
+ assertSame(PA.getValue(sg2.getGroupColourScheme(), "consensus"),
+ PA.getValue(sg.getGroupColourScheme(), "consensus"));
+ assertSame(PA.getValue(sg2.getGroupColourScheme(), "conservation"),
+ PA.getValue(sg.getGroupColourScheme(), "conservation"));
assertEquals(sg2.getDisplayBoxes(), sg.getDisplayBoxes());
assertEquals(sg2.getDisplayText(), sg.getDisplayText());
assertEquals(sg2.getColourText(), sg.getColourText());