c3a38738736aa7aa204ac5866e64170342c0783f
[jalview.git] / src / jalview / schemes / JalviewColourScheme.java
1 package jalview.schemes;
2
3
4 /**
5  * An enum with the colour schemes supported by Jalview.
6  */
7 public enum JalviewColourScheme
8 {
9   /*
10    * the order of declaration is the default order in which 
11    * items are added to Colour menus
12    */
13   Clustal("Clustal", ClustalxColourScheme.class), Blosum62("Blosum62",
14           Blosum62ColourScheme.class), PID("% Identity",
15           PIDColourScheme.class), Zappo("Zappo", ZappoColourScheme.class),
16   Taylor("Taylor", TaylorColourScheme.class), Hydrophobic("Hydrophobic",
17           HydrophobicColourScheme.class), Helix("Helix Propensity",
18           HelixColourScheme.class), Strand("Strand Propensity",
19           StrandColourScheme.class), Turn("Turn Propensity",
20           TurnColourScheme.class), Buried("Buried Index",
21           BuriedColourScheme.class), Nucleotide("Nucleotide",
22           NucleotideColourScheme.class), PurinePyrimidine(
23           "Purine/Pyrimidine", PurinePyrimidineColourScheme.class),
24   RNAHelices("RNA Helices", RNAHelicesColour.class), TCoffee(
25           "T-Coffee Scores", TCoffeeColourScheme.class),
26   HMMER("HMMER", HMMERColourScheme.class);
27   // RNAInteraction("RNA Interaction type", RNAInteractionColourScheme.class)
28
29   private String name;
30
31   private Class<? extends ColourSchemeI> myClass;
32
33   /**
34    * Constructor given the name of the colour scheme (as used in Jalview
35    * parameters). Note this is not necessarily the same as the 'display name'
36    * used in menu options (as this may be language-dependent).
37    * 
38    * @param s
39    */
40   JalviewColourScheme(String s, Class<? extends ColourSchemeI> cl)
41   {
42     name = s;
43     myClass = cl;
44   }
45
46   /**
47    * Returns the class of the colour scheme
48    * 
49    * @return
50    */
51   public Class<? extends ColourSchemeI> getSchemeClass()
52   {
53     return myClass;
54   }
55
56   /**
57    * Returns the 'official' name of this colour scheme. This is the name that
58    * identifies the colour scheme as a start-up parameter for the Jalview
59    * application or applet. Note that it may not be the name shown in menu
60    * options, as these may be internationalised.
61    */
62   @Override
63   public String toString()
64   {
65     return name;
66   }
67 }