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