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
Draw helices correctly
[jalview.git]
/
src
/
jalview
/
schemes
/
UserColourScheme.java
diff --git
a/src/jalview/schemes/UserColourScheme.java
b/src/jalview/schemes/UserColourScheme.java
index
41fc6c9
..
00f8f6f
100755
(executable)
--- a/
src/jalview/schemes/UserColourScheme.java
+++ b/
src/jalview/schemes/UserColourScheme.java
@@
-147,12
+147,11
@@
public class UserColourScheme
{
\r
token = st2.nextToken();
\r
\r
{
\r
token = st2.nextToken();
\r
\r
- int colIndex =
\r
- ( (Integer) ResidueProperties.aaHash.
\r
- get(token)).intValue();
\r
+ if (ResidueProperties.aaIndex[token.charAt(0)]==-1)
\r
+ continue;
\r
+
\r
+ int colIndex = ResidueProperties.aaIndex[token.charAt(0)];
\r
\r
\r
- //AW - LOWER CASE DISABLED IN 2.1.01 bug fix release
\r
- /*
\r
if(token.equalsIgnoreCase("lowerCase"))
\r
{
\r
if (lowerCaseColours == null)
\r
if(token.equalsIgnoreCase("lowerCase"))
\r
{
\r
if (lowerCaseColours == null)
\r
@@
-172,7
+171,7
@@
public class UserColourScheme
}
\r
lowerCaseColours[colIndex] = getColourFromString(colour);
\r
}
\r
}
\r
lowerCaseColours[colIndex] = getColourFromString(colour);
\r
}
\r
- else*/
\r
+ else
\r
colors[colIndex] = getColourFromString(colour);
\r
}
\r
}
\r
colors[colIndex] = getColourFromString(colour);
\r
}
\r
}
\r
@@
-187,16
+186,16
@@
public class UserColourScheme
\r
\r
\r
\r
\r
\r
- public Color findColour(String s, int j)
\r
+ public Color findColour(char c, int j)
\r
{
\r
{
\r
- int index = ((Integer) (ResidueProperties.aaHash.get(s))).intValue();
\r
+ Color currentColour;
\r
+ int index = ResidueProperties.aaIndex[c];
\r
\r
\r
- if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))
\r
+ if ((threshold == 0) || aboveThreshold(c, j))
\r
{
\r
{
\r
- //AW - LOWER CASE DISABLED IN 2.1.01 bug fix release
\r
- /* if(lowerCaseColours!=null && 'a' <= s.charAt(0) && s.charAt(0) <= 'z')
\r
+ if(lowerCaseColours!=null && 'a' <= c && c <= 'z')
\r
currentColour = lowerCaseColours[index];
\r
currentColour = lowerCaseColours[index];
\r
- else*/
\r
+ else
\r
currentColour = colors[index];
\r
}
\r
else
\r
currentColour = colors[index];
\r
}
\r
else
\r
@@
-205,7
+204,7
@@
public class UserColourScheme
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ currentColour = applyConservation(currentColour, j);
\r
\r
\r
return currentColour;
\r
\r
\r
return currentColour;
\r