for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++)
{
StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]);
- StringBuffer command = new StringBuffer();
+ StringBuilder command = new StringBuilder();
StructureMappingcommandSet smc;
ArrayList<String> str = new ArrayList<String>();
col = Color.GRAY;
}
- String newSelcom = (mapping[m].getChain() != " "
+ // todo JAL-3152 handle 'no chain' case without errors
+ boolean hasChain = true || mapping[m].getChain() != " ";
+ String chainSpec = hasChain
? ":" + mapping[m].getChain()
- : "") + "/" + (pdbfnum + 1) + ".1" + ";color["
+ : "";
+ String newSelcom = chainSpec + "/" + (pdbfnum + 1) + ".1" + ";color["
+ col.getRed() + "," + col.getGreen() + ","
+ col.getBlue() + "]";
if (command.length() > newSelcom.length() && command
return cset.toArray(new StructureMappingcommandSet[cset.size()]);
}
- public static StringBuffer condenseCommand(StringBuffer command, int pos)
+ public static StringBuilder condenseCommand(StringBuilder command, int pos)
{
// work back to last 'select'
;
} while ((q = command.indexOf("select", p)) == -1 && p > 0);
- StringBuffer sb = new StringBuffer(command.substring(0, q + 7));
+ StringBuilder sb = new StringBuilder(command.substring(0, q + 7));
command = command.delete(0, q + 7);