* along with this program; if not, write to the Free Software\r
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
*/\r
-/*\r
+\r
package jalview.schemes;\r
import java.util.*;\r
import java.awt.*;\r
ResidueColour[19] = colours[0]; // V\r
}\r
\r
- public Color findColour(DrawableSequence seq, String s, int j) {\r
- // System.out.println("Finding colour for " + s + " " + j);\r
- int i = seq.num[j];\r
- Color c = Color.white;\r
- for (int k=0; k < ResidueColour[i].conses.length ; k++) {\r
- if (ResidueColour[i].conses[k].isConserved(cons2,j,seq.num[j],size)) {\r
- c = ResidueColour[i].c;\r
- }\r
- }\r
- if (i ==4) {\r
- if (conses[27].isConserved(cons2,j,seq.num[j],size)) {\r
- c = (Color)colhash.get("PINK");\r
- }\r
- }\r
- return c;\r
+ public Color findColour(String s)\r
+ {\r
+ return Color.pink;\r
}\r
\r
- public void setColours(DrawableSequence seq, int j) {\r
- Color c = Color.white;\r
+ public Color findColour(String s, int j, Vector seqs)\r
+ {\r
\r
- String s = seq.getSequence().substring(j,j+1);\r
- try {\r
- c = findColour(seq,s,j);\r
- seq.setResidueBoxColour(j,c);\r
- } catch (Exception e) {\r
- seq.setResidueBoxColour(j,Color.white);\r
- }\r
- }\r
+ int i = Integer.parseInt( ResidueProperties.aaHash.get(s).toString() );\r
\r
- public void setColours(DrawableSequence s) {\r
- for (int j = 0; j < s.sequence.length(); j++) {\r
- setColours(s,j);\r
- }\r
+ return ResidueColour[i].c;\r
}\r
\r
- public void setColours(SequenceGroup sg) {\r
- for (int j = 0; j < sg.sequences.size(); j++) {\r
+ public boolean canThreshold()\r
+ {\r
+ return false;\r
+ }\r
\r
- DrawableSequence s = (DrawableSequence)sg.sequences.elementAt(j);\r
- for (int i = 0; i < s.getSequence().length();i++) {\r
- setColours(s,i);\r
- }\r
- }\r
+ public boolean isUserDefinable()\r
+ {\r
+ return false;\r
}\r
\r
+}\r
+\r
+class ConsensusColour {\r
+\r
+ Consensus[] conses;\r
+ Color c;\r
\r
+ public ConsensusColour(Color c,Consensus[] conses) {\r
+ this.conses = conses;\r
+ // this.list = list;\r
+ this.c = c;\r
+ }\r
}\r
\r
-*/\r
\r
\r
\r