Merge branch 'develop' into bug/JAL-2255_seq-fetcher-broken-on-linux
[jalview.git] / src / jalview / schemes / JalviewColourScheme.java
diff --git a/src/jalview/schemes/JalviewColourScheme.java b/src/jalview/schemes/JalviewColourScheme.java
new file mode 100644 (file)
index 0000000..185d2b4
--- /dev/null
@@ -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<? extends ColourSchemeI> 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<? extends ColourSchemeI> cl)
+  {
+    name = s;
+    myClass = cl;
+  }
+
+  /**
+   * Returns the class of the colour scheme
+   * 
+   * @return
+   */
+  public Class<? extends ColourSchemeI> 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;
+  }
+}