\r
public Color findColour(String s, int j)\r
{\r
+ if( threshold!=0 && !aboveThreshold(s,j))\r
+ return Color.white;\r
+\r
Hashtable hash = (Hashtable)consensus.elementAt(j);\r
\r
if (!jalview.util.Comparison.isGap((s.charAt(0))))\r
\r
}\r
\r
- public boolean canThreshold()\r
- {\r
- return true;\r
- }\r
\r
}\r
import java.util.*;\r
import java.awt.*;\r
\r
-public class ClustalxColourScheme implements ColourSchemeI\r
+public class ClustalxColourScheme extends ResidueColourScheme\r
{\r
Hashtable[] cons;\r
int[][] cons2;\r
\r
public Color findColour(String s, int j)\r
{\r
+ if( threshold!=0 && !aboveThreshold(s,j))\r
+ return Color.white;\r
+\r
+\r
int i = ((Integer)ResidueProperties.aaHash.get(s)).intValue();\r
\r
Color c = Color.white;\r
return c;\r
\r
}\r
-\r
- public void setConsensus(Vector consensus)\r
- {\r
- // Clustal colouring cannot be coloured by PID\r
- }\r
-\r
- public boolean canThreshold()\r
- {\r
- return false;\r
- }\r
-\r
- public boolean isUserDefinable()\r
- {\r
- return false;\r
- }\r
-\r
-\r
}\r
\r
class ConsensusColour {\r
{\r
public Color findColour(String aa);\r
public Color findColour(String s,int j);\r
- public boolean canThreshold();\r
- public boolean isUserDefinable();\r
public void setConsensus(Vector v);\r
}\r
case TURN: cs = new TurnColourScheme(); break;\r
case BURIED: cs = new BuriedColourScheme(); break;\r
case NUCLEOTIDE: cs = new NucleotideColourScheme(); break;\r
- case USER_DEFINED:\r
- // if(jalview.bin.Cache.getProperty("USER_DEFINED_COLOUR")!=null)\r
- {\r
- // cs = jalview.gui.UserDefinedColours.loadDefaultColours(jalview.bin.Cache.getProperty("USER_DEFINED_COLOUR"));\r
- }\r
+ case USER_DEFINED: cs = new UserColourScheme(null);\r
break;\r
\r
default: break;\r
}\r
\r
\r
+\r
public Color findColour(String s, int j) {\r
- Color c = Color.white;\r
+\r
+ if( threshold!=0 && !aboveThreshold(s,j))\r
+ return Color.white;\r
+\r
+ Color c = Color.white;\r
Hashtable hash = (Hashtable)consensus.elementAt(j);\r
\r
double sc = 0;\r
\r
return false;\r
}\r
-\r
- public boolean canThreshold() {\r
- return true;\r
- }\r
- public boolean isUserDefinable() {\r
- return false;\r
- }\r
}\r
\r
public class UserColourScheme extends ResidueColourScheme\r
{\r
- public void setColourScheme(Color [] newColors)\r
+ public UserColourScheme(Color [] newColors)\r
{\r
colors = newColors;\r
}\r
+\r
+ public Color[] getColours()\r
+ {\r
+ return colors;\r
+ }\r
}\r
public ZappoColourScheme() {\r
super(ResidueProperties.color,0);\r
}\r
-\r
- public boolean isUserDefinable() {\r
- return true;\r
- }\r
-\r
}\r