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
Merge branch 'develop' into trial_merge/JAL-1950
[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
a809cae
..
6bf7010
100644
(file)
--- a/
src/jalview/ext/jmol/JmolCommands.java
+++ b/
src/jalview/ext/jmol/JmolCommands.java
@@
-21,11
+21,13
@@
package jalview.ext.jmol;
import jalview.api.AlignViewportI;
package jalview.ext.jmol;
import jalview.api.AlignViewportI;
+import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureRenderer;
import jalview.api.SequenceRenderer;
import jalview.datamodel.AlignmentI;
import jalview.api.FeatureRenderer;
import jalview.api.SequenceRenderer;
import jalview.datamodel.AlignmentI;
-import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.HiddenColumns;
import jalview.datamodel.SequenceI;
import jalview.datamodel.SequenceI;
+import jalview.renderer.seqfeatures.FeatureColourFinder;
import jalview.structure.StructureMapping;
import jalview.structure.StructureMappingcommandSet;
import jalview.structure.StructureSelectionManager;
import jalview.structure.StructureMapping;
import jalview.structure.StructureMappingcommandSet;
import jalview.structure.StructureSelectionManager;
@@
-53,10
+55,13
@@
public class JmolCommands
*/
public static StructureMappingcommandSet[] getColourBySequenceCommand(
StructureSelectionManager ssm, String[] files,
*/
public static StructureMappingcommandSet[] getColourBySequenceCommand(
StructureSelectionManager ssm, String[] files,
- SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr,
- AlignViewportI viewport)
+ SequenceI[][] sequence, SequenceRenderer sr,
+ AlignmentViewPanel viewPanel)
{
{
- ColumnSelection cs = viewport.getColumnSelection();
+ FeatureRenderer fr = viewPanel.getFeatureRenderer();
+ FeatureColourFinder finder = new FeatureColourFinder(fr);
+ AlignViewportI viewport = viewPanel.getAlignViewport();
+ HiddenColumns cs = viewport.getAlignment().getHiddenColumns();
AlignmentI al = viewport.getAlignment();
List<StructureMappingcommandSet> cset = new ArrayList<StructureMappingcommandSet>();
AlignmentI al = viewport.getAlignment();
List<StructureMappingcommandSet> cset = new ArrayList<StructureMappingcommandSet>();
@@
-97,37
+102,25
@@
public class JmolCommands
lastPos = pos;
lastPos = pos;
- Color col = sr.getResidueBoxColour(sequence[pdbfnum][s], r);
-
- if (fr != null)
- {
- col = fr.findFeatureColour(col, sequence[pdbfnum][s], r);
- }
+ Color col = sr.getResidueColour(sequence[pdbfnum][s], r,
+ finder);
/*
* shade hidden regions darker
*/
if (!cs.isVisible(r))
{
/*
* shade hidden regions darker
*/
if (!cs.isVisible(r))
{
- // col = ColorUtils.darkerThan(col);
col = Color.GRAY;
}
col = Color.GRAY;
}
- String newSelcom = (mapping[m].getChain() != " " ? ":"
- + mapping[m].getChain() : "")
- + "/"
- + (pdbfnum + 1)
- + ".1"
- + ";color["
- + col.getRed()
- + ","
- + col.getGreen()
- + ","
+ String newSelcom = (mapping[m].getChain() != " "
+ ? ":" + mapping[m].getChain()
+ : "") + "/" + (pdbfnum + 1) + ".1" + ";color["
+ + col.getRed() + "," + col.getGreen() + ","
+ col.getBlue() + "]";
+ col.getBlue() + "]";
- if (command.length() > newSelcom.length()
- && command.substring(
- command.length() - newSelcom.length())
- .equals(newSelcom))
+ if (command.length() > newSelcom.length() && command
+ .substring(command.length() - newSelcom.length())
+ .equals(newSelcom))
{
command = JmolCommands.condenseCommand(command, pos);
continue;
{
command = JmolCommands.condenseCommand(command, pos);
continue;