1 package jalview.schemes;
3 public class ColourSchemeProperty
5 public static final int CLUSTAL = 0;
6 public static final int BLOSUM = 1;
7 public static final int PID = 2;
8 public static final int ZAPPO = 3;
9 public static final int HYDROPHOBIC=4;
10 public static final int HELIX=5;
11 public static final int STRAND=6;
12 public static final int TURN = 7;
13 public static final int BURIED = 8;
14 public static final int NUCLEOTIDE = 9;
15 public static final int USER_DEFINED = 10;
16 public static final int NONE = 11;
19 public static String getColourName(int index)
24 case CLUSTAL: ret = "Clustal"; break;
25 case BLOSUM: ret = "Blosum62"; break;
26 case PID: ret = "% Identity"; break;
27 case ZAPPO: ret = "Zappo"; break;
28 case HYDROPHOBIC: ret="Hydrophobic";break;
29 case HELIX: ret="Helix Propensity";break;
30 case STRAND: ret="Strand Propensity";break;
31 case TURN: ret="Turn Propensity";break;
32 case BURIED: ret="Buried Index";break;
33 case NUCLEOTIDE:ret="Nucleotide"; break;
34 case USER_DEFINED:ret="User Defined";break;
35 default: ret = "None"; break;
40 public static ColourSchemeI getColour(jalview.datamodel.AlignmentI al, String name)
42 for(int i=0; i<12; i++)
44 if(getColourName(i).equals(name))
45 return getColour(al, i);
50 public static ColourSchemeI getColour(jalview.datamodel.AlignmentI al, int index)
52 ColourSchemeI cs = null;
55 case CLUSTAL: cs = new ClustalxColourScheme(al.getSequences(), al.getWidth()); break;
56 case BLOSUM: cs = new Blosum62ColourScheme(); break;
57 case PID: cs = new PIDColourScheme(); break;
58 case ZAPPO: cs = new ZappoColourScheme(); break;
59 case HYDROPHOBIC: cs = new HydrophobicColourScheme(); break;
60 case HELIX: cs = new HelixColourScheme(); break;
61 case STRAND: cs = new StrandColourScheme(); break;
62 case TURN: cs = new TurnColourScheme(); break;
63 case BURIED: cs = new BuriedColourScheme(); break;
64 case NUCLEOTIDE: cs = new NucleotideColourScheme(); break;
66 if(jalview.bin.Cache.getProperty("USER_DEFINED_COLOUR")!=null)
68 cs = jalview.gui.UserDefinedColours.loadDefaultColours(jalview.bin.Cache.getProperty("USER_DEFINED_COLOUR"));