X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FJalviewColourScheme.java;fp=src%2Fjalview%2Fschemes%2FJalviewColourScheme.java;h=185d2b422c2cf5580ccadec1d6b93e0548d2cdf6;hb=2595e9d4ee0dbbd3406a98c4e49a61ccde806479;hp=0000000000000000000000000000000000000000;hpb=e20075ba805d744d7cc4976e2b8d5e5840fb0a8d;p=jalview.git diff --git a/src/jalview/schemes/JalviewColourScheme.java b/src/jalview/schemes/JalviewColourScheme.java new file mode 100644 index 0000000..185d2b4 --- /dev/null +++ b/src/jalview/schemes/JalviewColourScheme.java @@ -0,0 +1,66 @@ +package jalview.schemes; + + +/** + * An enum with the colour schemes supported by Jalview. + */ +public enum JalviewColourScheme +{ + /* + * the order of declaration is the default order in which + * items are added to Colour menus + */ + Clustal("Clustal", ClustalxColourScheme.class), Blosum62("Blosum62", + Blosum62ColourScheme.class), PID("% Identity", + PIDColourScheme.class), Zappo("Zappo", ZappoColourScheme.class), + Taylor("Taylor", TaylorColourScheme.class), Hydrophobic("Hydrophobic", + HydrophobicColourScheme.class), Helix("Helix Propensity", + HelixColourScheme.class), Strand("Strand Propensity", + StrandColourScheme.class), Turn("Turn Propensity", + TurnColourScheme.class), Buried("Buried Index", + BuriedColourScheme.class), Nucleotide("Nucleotide", + NucleotideColourScheme.class), PurinePyrimidine( + "Purine/Pyrimidine", PurinePyrimidineColourScheme.class), + RNAHelices("RNA Helices", RNAHelicesColour.class), TCoffee( + "T-Coffee Scores", TCoffeeColourScheme.class); + // RNAInteraction("RNA Interaction type", RNAInteractionColourScheme.class) + + private String name; + + private Class myClass; + + /** + * Constructor given the name of the colour scheme (as used in Jalview + * parameters). Note this is not necessarily the same as the 'display name' + * used in menu options (as this may be language-dependent). + * + * @param s + */ + JalviewColourScheme(String s, Class cl) + { + name = s; + myClass = cl; + } + + /** + * Returns the class of the colour scheme + * + * @return + */ + public Class getSchemeClass() + { + return myClass; + } + + /** + * Returns the 'official' name of this colour scheme. This is the name that + * identifies the colour scheme as a start-up parameter for the Jalview + * application or applet. Note that it may not be the name shown in menu + * options, as these may be internationalised. + */ + @Override + public String toString() + { + return name; + } +}