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-2437 Synchronization corrections and unit tests
[jalview.git]
/
src
/
jalview
/
appletgui
/
TreeCanvas.java
diff --git
a/src/jalview/appletgui/TreeCanvas.java
b/src/jalview/appletgui/TreeCanvas.java
index
47c2d28
..
e30879c
100755
(executable)
--- a/
src/jalview/appletgui/TreeCanvas.java
+++ b/
src/jalview/appletgui/TreeCanvas.java
@@
-528,8
+528,7
@@
public class TreeCanvas extends Panel implements MouseListener,
for (int i = 0; i < leaves.size(); i++)
{
for (int i = 0; i < leaves.size(); i++)
{
- SequenceI seq = (SequenceI) leaves.elementAt(i)
- .element();
+ SequenceI seq = (SequenceI) leaves.elementAt(i).element();
treeSelectionChanged(seq);
}
}
treeSelectionChanged(seq);
}
}
@@
-628,14
+627,13
@@
public class TreeCanvas extends Panel implements MouseListener,
(int) (Math.random() * 255), (int) (Math.random() * 255));
setColor(tree.getGroups().elementAt(i), col.brighter());
(int) (Math.random() * 255), (int) (Math.random() * 255));
setColor(tree.getGroups().elementAt(i), col.brighter());
- Vector<SequenceNode> l = tree.findLeaves(tree
- .getGroups().elementAt(i));
+ Vector<SequenceNode> l = tree.findLeaves(tree.getGroups()
+ .elementAt(i));
Vector<SequenceI> sequences = new Vector<SequenceI>();
for (int j = 0; j < l.size(); j++)
{
Vector<SequenceI> sequences = new Vector<SequenceI>();
for (int j = 0; j < l.size(); j++)
{
- SequenceI s1 = (SequenceI) l.elementAt(j)
- .element();
+ SequenceI s1 = (SequenceI) l.elementAt(j).element();
if (!sequences.contains(s1))
{
sequences.addElement(s1);
if (!sequences.contains(s1))
{
sequences.addElement(s1);
@@
-658,35
+656,38
@@
public class TreeCanvas extends Panel implements MouseListener,
}
else
{
}
else
{
- cs = ColourSchemeProperty.getColour(sg, ColourSchemeProperty
- .getColourName(av.getGlobalColourScheme()));
+ cs = ColourSchemeProperty.getColourScheme(sg,
+ ColourSchemeProperty.getColourName(av
+ .getGlobalColourScheme()));
}
// cs is null if shading is an annotationColourGradient
}
// cs is null if shading is an annotationColourGradient
- if (cs != null)
- {
- cs.setThreshold(av.getGlobalColourScheme().getThreshold(),
- av.isIgnoreGapsConsensus());
- }
+ // if (cs != null)
+ // {
+ // cs.setThreshold(av.getViewportColourScheme().getThreshold(),
+ // av.isIgnoreGapsConsensus());
+ // }
}
// TODO: cs used to be initialized with a sequence collection and
// recalcConservation called automatically
// instead we set it manually - recalc called after updateAnnotation
}
// TODO: cs used to be initialized with a sequence collection and
// recalcConservation called automatically
// instead we set it manually - recalc called after updateAnnotation
- sg.cs = cs;
+ sg.setColourScheme(cs);
+ sg.getGroupColourScheme().setThreshold(
+ av.getResidueShading().getThreshold(),
+ av.isIgnoreGapsConsensus());
sg.setName("JTreeGroup:" + sg.hashCode());
sg.setIdColour(col);
if (av.getGlobalColourScheme() != null
sg.setName("JTreeGroup:" + sg.hashCode());
sg.setIdColour(col);
if (av.getGlobalColourScheme() != null
- && av.getGlobalColourScheme().conservationApplied())
+ && av.getResidueShading().conservationApplied())
{
{
- Conservation c = new Conservation("Group", 3,
- sg.getSequences(null), sg.getStartRes(), sg.getEndRes());
+ Conservation c = new Conservation("Group", sg.getSequences(null),
+ sg.getStartRes(), sg.getEndRes());
c.calculate();
c.verdict(false, av.getConsPercGaps());
c.calculate();
c.verdict(false, av.getConsPercGaps());
- cs.setConservation(c);
-
- sg.cs = cs;
+ sg.setColourScheme(cs);
+ sg.getGroupColourScheme().setConservation(c);
}
av.getAlignment().addGroup(sg);
}
av.getAlignment().addGroup(sg);