git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3541 selectively merged build.gradle and gradle.properties
[jalview.git]
/
src
/
jalview
/
ext
/
jmol
/
JmolCommands.java
diff --git
a/src/jalview/ext/jmol/JmolCommands.java
b/src/jalview/ext/jmol/JmolCommands.java
index
8fb0de6
..
603202a
100644
(file)
--- a/
src/jalview/ext/jmol/JmolCommands.java
+++ b/
src/jalview/ext/jmol/JmolCommands.java
@@
-68,7
+68,7
@@
public class JmolCommands
for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++)
{
StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]);
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>();
StructureMappingcommandSet smc;
ArrayList<String> str = new ArrayList<String>();
@@
-125,9
+125,12
@@
public class JmolCommands
col = Color.GRAY;
}
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()
? ":" + 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
+ col.getRed() + "," + col.getGreen() + ","
+ col.getBlue() + "]";
if (command.length() > newSelcom.length() && command
@@
-172,7
+175,7
@@
public class JmolCommands
return cset.toArray(new StructureMappingcommandSet[cset.size()]);
}
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'
{
// work back to last 'select'
@@
-187,7
+190,7
@@
public class JmolCommands
;
} while ((q = command.indexOf("select", p)) == -1 && p > 0);
;
} 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);
command = command.delete(0, q + 7);