public void testBuildColourCommands()
{
- Map<Object, AtomSpecModel> map = new LinkedHashMap<Object, AtomSpecModel>();
+ Map<Object, AtomSpecModel> map = new LinkedHashMap<>();
ChimeraCommands.addColourRange(map, Color.blue, 0, 2, 5, "A");
ChimeraCommands.addColourRange(map, Color.blue, 0, 7, 7, "B");
ChimeraCommands.addColourRange(map, Color.blue, 0, 9, 23, "A");
// Colours should appear in the Chimera command in the order in which
// they were added; within colour, by model, by chain, ranges in start order
+ // all prefixed with #808080 to colour hidden regions (if shown) gray
String command = ChimeraCommands.buildColourCommands(map).get(0);
assertEquals(
command,
- "color #0000ff #0:2-5.A,9-23.A,7.B|#1:1.A,4-7.B; color #ffff00 #1:3-5.A,8.A; color #ff0000 #0:3-9.A");
+ "color #808080; color #0000ff #0:2-5.A,9-23.A,7.B|#1:1.A,4-7.B; color #ffff00 #1:3-5.A,8.A; color #ff0000 #0:3-9.A");
}
@Test(groups = { "Functional" })
/*
* make a map of { featureType, {featureValue, {residue range specification } } }
*/
- Map<String, Map<Object, AtomSpecModel>> featuresMap = new LinkedHashMap<String, Map<Object, AtomSpecModel>>();
- Map<Object, AtomSpecModel> featureValues = new HashMap<Object, AtomSpecModel>();
+ Map<String, Map<Object, AtomSpecModel>> featuresMap = new LinkedHashMap<>();
+ Map<Object, AtomSpecModel> featureValues = new HashMap<>();
/*
* start with just one feature/value...
/*
* map residues 1-10 to residues 21-30 (atoms 105-150) in structures
*/
- HashMap<Integer, int[]> map = new HashMap<Integer, int[]>();
+ HashMap<Integer, int[]> map = new HashMap<>();
for (int pos = 1; pos <= seq1.getLength(); pos++)
{
map.put(pos, new int[] { 20 + pos, 5 * (20 + pos) });
ssm.addStructureMapping(sm2);
StructureMappingcommandSet[] commands = ChimeraCommands
- .getColourBySequenceCommand(ssm, files, seqs, sr, af.alignPanel);
+ .getColourBySequenceCommand(ssm, files, seqs, sr, false,
+ af.alignPanel);
assertEquals(1, commands.length);
assertEquals(1, commands[0].commands.length);
String theCommand = commands[0].commands[0];