git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0fc704a
)
CurrentColour must not be accessed by multiple sequence renderers
author
amwaterhouse
<Andrew Waterhouse>
Tue, 28 Nov 2006 16:48:11 +0000
(16:48 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Tue, 28 Nov 2006 16:48:11 +0000
(16:48 +0000)
src/jalview/schemes/AnnotationColourGradient.java
patch
|
blob
|
history
src/jalview/schemes/Blosum62ColourScheme.java
patch
|
blob
|
history
src/jalview/schemes/ClustalxColourScheme.java
patch
|
blob
|
history
src/jalview/schemes/NucleotideColourScheme.java
patch
|
blob
|
history
src/jalview/schemes/PIDColourScheme.java
patch
|
blob
|
history
src/jalview/schemes/ResidueColourScheme.java
patch
|
blob
|
history
src/jalview/schemes/ScoreColourScheme.java
patch
|
blob
|
history
src/jalview/schemes/UserColourScheme.java
patch
|
blob
|
history
diff --git
a/src/jalview/schemes/AnnotationColourGradient.java
b/src/jalview/schemes/AnnotationColourGradient.java
index
c67eafc
..
8367cad
100755
(executable)
--- a/
src/jalview/schemes/AnnotationColourGradient.java
+++ b/
src/jalview/schemes/AnnotationColourGradient.java
@@
-141,7
+141,7
@@
public class AnnotationColourGradient extends ResidueColourScheme
*/
\r
public Color findColour(String n, int j)
\r
{
\r
*/
\r
public Color findColour(String n, int j)
\r
{
\r
- currentColour = Color.white;
\r
+ Color currentColour = Color.white;
\r
\r
if ((threshold == 0) || aboveThreshold(n, j))
\r
{
\r
\r
if ((threshold == 0) || aboveThreshold(n, j))
\r
{
\r
@@
-179,7
+179,7
@@
public class AnnotationColourGradient extends ResidueColourScheme
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ applyConservation(currentColour, j);
\r
\r
return currentColour;
\r
}
\r
\r
return currentColour;
\r
}
\r
diff --git
a/src/jalview/schemes/Blosum62ColourScheme.java
b/src/jalview/schemes/Blosum62ColourScheme.java
index
ec5d4f1
..
d3b93bf
100755
(executable)
--- a/
src/jalview/schemes/Blosum62ColourScheme.java
+++ b/
src/jalview/schemes/Blosum62ColourScheme.java
@@
-32,6
+32,7
@@
public class Blosum62ColourScheme
\r
public Color findColour(String s, int j)
\r
{
\r
\r
public Color findColour(String s, int j)
\r
{
\r
+
\r
char res = s.charAt(0);
\r
if ('a' <= res && res <= 'z' )
\r
{
\r
char res = s.charAt(0);
\r
if ('a' <= res && res <= 'z' )
\r
{
\r
@@
-47,6
+48,8
@@
public class Blosum62ColourScheme
return Color.white;
\r
}
\r
\r
return Color.white;
\r
}
\r
\r
+ Color currentColour;
\r
+
\r
if (!jalview.util.Comparison.isGap( res ))
\r
{
\r
String max = (String) consensus[j].get(AAFrequency.MAXRESIDUE);
\r
if (!jalview.util.Comparison.isGap( res ))
\r
{
\r
String max = (String) consensus[j].get(AAFrequency.MAXRESIDUE);
\r
@@
-79,7
+82,7
@@
public class Blosum62ColourScheme
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ applyConservation(currentColour, j);
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
diff --git
a/src/jalview/schemes/ClustalxColourScheme.java
b/src/jalview/schemes/ClustalxColourScheme.java
index
04610ef
..
ce30de8
100755
(executable)
--- a/
src/jalview/schemes/ClustalxColourScheme.java
+++ b/
src/jalview/schemes/ClustalxColourScheme.java
@@
-247,12
+247,10
@@
public class ClustalxColourScheme
\r
public Color findColour(String s, int j)
\r
{
\r
\r
public Color findColour(String s, int j)
\r
{
\r
-
\r
- if(cons2.length<=j)
\r
- return currentColour;
\r
+ Color currentColour;
\r
\r
\r
\r
\r
- if ( (threshold != 0) && !aboveThreshold(s, j))
\r
+ if ( cons2.length<=j || (threshold != 0 && !aboveThreshold(s, j)))
\r
{
\r
return Color.white;
\r
}
\r
{
\r
return Color.white;
\r
}
\r
@@
-283,7
+281,7
@@
public class ClustalxColourScheme
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ applyConservation(currentColour, j);
\r
\r
return currentColour;
\r
}
\r
\r
return currentColour;
\r
}
\r
diff --git
a/src/jalview/schemes/NucleotideColourScheme.java
b/src/jalview/schemes/NucleotideColourScheme.java
index
6aaef7d
..
f36bcad
100755
(executable)
--- a/
src/jalview/schemes/NucleotideColourScheme.java
+++ b/
src/jalview/schemes/NucleotideColourScheme.java
@@
-60,6
+60,7
@@
public class NucleotideColourScheme extends ResidueColourScheme
*/
\r
public Color findColour(String n, int j)
\r
{
\r
*/
\r
public Color findColour(String n, int j)
\r
{
\r
+ Color currentColour;
\r
if ((threshold == 0) || aboveThreshold(n, j))
\r
{
\r
try
\r
if ((threshold == 0) || aboveThreshold(n, j))
\r
{
\r
try
\r
@@
-77,7
+78,7
@@
public class NucleotideColourScheme extends ResidueColourScheme
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ applyConservation(currentColour, j);
\r
\r
return currentColour;
\r
}
\r
\r
return currentColour;
\r
}
\r
diff --git
a/src/jalview/schemes/PIDColourScheme.java
b/src/jalview/schemes/PIDColourScheme.java
index
8061e67
..
b287384
100755
(executable)
--- a/
src/jalview/schemes/PIDColourScheme.java
+++ b/
src/jalview/schemes/PIDColourScheme.java
@@
-56,7
+56,7
@@
public class PIDColourScheme
return Color.white;
\r
}
\r
\r
return Color.white;
\r
}
\r
\r
- currentColour = Color.white;
\r
+ Color currentColour = Color.white;
\r
\r
double sc = 0;
\r
\r
\r
double sc = 0;
\r
\r
@@
-83,7
+83,7
@@
public class PIDColourScheme
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ applyConservation(currentColour, j);
\r
\r
return currentColour;
\r
}
\r
\r
return currentColour;
\r
}
\r
diff --git
a/src/jalview/schemes/ResidueColourScheme.java
b/src/jalview/schemes/ResidueColourScheme.java
index
64fd62e
..
bf83665
100755
(executable)
--- a/
src/jalview/schemes/ResidueColourScheme.java
+++ b/
src/jalview/schemes/ResidueColourScheme.java
@@
-52,12
+52,6
@@
public class ResidueColourScheme implements ColourSchemeI
/** DOCUMENT ME!! */
\r
int inc = 30;
\r
\r
/** DOCUMENT ME!! */
\r
int inc = 30;
\r
\r
- /**
\r
- * The colour to be calculated, manipulated and returned
\r
- */
\r
- Color currentColour = null;
\r
-
\r
-
\r
\r
/**
\r
* Creates a new ResidueColourScheme object.
\r
\r
/**
\r
* Creates a new ResidueColourScheme object.
\r
@@
-90,7
+84,7
@@
public class ResidueColourScheme implements ColourSchemeI
\r
public Color findColour(String s, int j)
\r
{
\r
\r
public Color findColour(String s, int j)
\r
{
\r
-
\r
+ Color currentColour;
\r
int index = ResidueProperties.aaIndex[s.charAt(0)];
\r
\r
if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))
\r
int index = ResidueProperties.aaIndex[s.charAt(0)];
\r
\r
if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))
\r
@@
-103,7
+97,7
@@
public class ResidueColourScheme implements ColourSchemeI
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ applyConservation(currentColour, j);
\r
\r
\r
return currentColour;
\r
\r
\r
return currentColour;
\r
@@
-227,7
+221,7
@@
public class ResidueColourScheme implements ColourSchemeI
* @return DOCUMENT ME!
\r
*/
\r
\r
* @return DOCUMENT ME!
\r
*/
\r
\r
- void applyConservation(int i)
\r
+ void applyConservation(Color currentColour, int i)
\r
{
\r
\r
if ((conservation[i] != '*') && (conservation[i] != '+'))
\r
{
\r
\r
if ((conservation[i] != '*') && (conservation[i] != '+'))
\r
diff --git
a/src/jalview/schemes/ScoreColourScheme.java
b/src/jalview/schemes/ScoreColourScheme.java
index
1f9116c
..
c9f7fc8
100755
(executable)
--- a/
src/jalview/schemes/ScoreColourScheme.java
+++ b/
src/jalview/schemes/ScoreColourScheme.java
@@
-99,10
+99,10
@@
public class ScoreColourScheme extends ResidueColourScheme
return Color.white;
\r
}
\r
\r
return Color.white;
\r
}
\r
\r
- currentColour = colors[ ResidueProperties.aaIndex[c] ];
\r
+ Color currentColour = colors[ ResidueProperties.aaIndex[c] ];
\r
\r
if(conservationColouring)
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ applyConservation(currentColour, j);
\r
\r
return currentColour;
\r
}
\r
\r
return currentColour;
\r
}
\r
diff --git
a/src/jalview/schemes/UserColourScheme.java
b/src/jalview/schemes/UserColourScheme.java
index
3349283
..
9d61279
100755
(executable)
--- a/
src/jalview/schemes/UserColourScheme.java
+++ b/
src/jalview/schemes/UserColourScheme.java
@@
-188,6
+188,7
@@
public class UserColourScheme
\r
public Color findColour(String s, int j)
\r
{
\r
\r
public Color findColour(String s, int j)
\r
{
\r
+ Color currentColour;
\r
int index = ResidueProperties.aaIndex[s.charAt(0)];
\r
\r
if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))
\r
int index = ResidueProperties.aaIndex[s.charAt(0)];
\r
\r
if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))
\r
@@
-203,7
+204,7
@@
public class UserColourScheme
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ applyConservation(currentColour, j);
\r
\r
\r
return currentColour;
\r
\r
\r
return currentColour;
\r