/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.SortedMap;
import java.util.TreeMap;
/**
SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr,
AlignmentI alignment)
{
- Map<Color, Map<Integer, Map<String, List<int[]>>>> colourMap = buildColoursMap(
+ Map<Color, SortedMap<Integer, Map<String, List<int[]>>>> colourMap = buildColoursMap(
ssm, files, sequence, sr, fr, alignment);
List<String> colourCommands = buildColourCommands(colourMap);
* @return
*/
protected static List<String> buildColourCommands(
- Map<Color, Map<Integer, Map<String, List<int[]>>>> colourMap)
+ Map<Color, SortedMap<Integer, Map<String, List<int[]>>>> colourMap)
{
/*
* This version concatenates all commands into a single String (semi-colon
* Ordering is by order of addition (for colours and positions), natural ordering (for models and chains)
* </pre>
*/
- protected static Map<Color, Map<Integer, Map<String, List<int[]>>>> buildColoursMap(
+ protected static Map<Color, SortedMap<Integer, Map<String, List<int[]>>>> buildColoursMap(
StructureSelectionManager ssm, String[] files,
SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr,
AlignmentI alignment)
{
- Map<Color, Map<Integer, Map<String, List<int[]>>>> colourMap = new LinkedHashMap<Color, Map<Integer, Map<String, List<int[]>>>>();
+ Map<Color, SortedMap<Integer, Map<String, List<int[]>>>> colourMap = new LinkedHashMap<Color, SortedMap<Integer, Map<String, List<int[]>>>>();
Color lastColour = null;
for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++)
{
addColourRange(colourMap, lastColour, pdbfnum, startPos,
lastPos, lastChain);
}
- break;
+ // break;
}
}
}
* @param chain
*/
protected static void addColourRange(
- Map<Color, Map<Integer, Map<String, List<int[]>>>> colourMap,
+ Map<Color, SortedMap<Integer, Map<String, List<int[]>>>> colourMap,
Color colour, int model, int startPos, int endPos, String chain)
{
/*
* Get/initialize map of data for the colour
*/
- Map<Integer, Map<String, List<int[]>>> colourData = colourMap
+ SortedMap<Integer, Map<String, List<int[]>>> colourData = colourMap
.get(colour);
if (colourData == null)
{