Clover icon

Coverage Report

  1. Project Clover database Thu Dec 4 2025 14:43:25 GMT
  2. Package jalview.schemes

File JalviewColourScheme.java

 

Coverage histogram

../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
4
3
1
96
44
3
0.75
1.33
3
1

Classes

Class Line # Actions
JalviewColourScheme 26 4 3
1.0100%
 

Contributing tests

This file is covered by 201 tests. .

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.schemes;
22   
23    /**
24    * An enum with the colour schemes supported by Jalview.
25    */
 
26    public enum JalviewColourScheme
27    {
28    /*
29    * the order of declaration is the default order in which
30    * items are added to Colour menus
31    */
32    Clustal("Clustal", ClustalxColourScheme.class),
33    Blosum62("Blosum62", Blosum62ColourScheme.class),
34    PID("% Identity", PIDColourScheme.class),
35    Zappo("Zappo", ZappoColourScheme.class),
36    Taylor("Taylor", TaylorColourScheme.class),
37    Flower("gecos-flower", FlowerColourScheme.class),
38    Blossom("gecos-blossom", BlossomColourScheme.class),
39    Sunset("gecos-sunset", SunsetColourScheme.class),
40    Ocean("gecos-ocean", OceanColourScheme.class),
41    Hydrophobic("Hydrophobic", HydrophobicColourScheme.class),
42    Helix("Helix Propensity", HelixColourScheme.class),
43    Strand("Strand Propensity", StrandColourScheme.class),
44    Turn("Turn Propensity", TurnColourScheme.class),
45    Buried("Buried Index", BuriedColourScheme.class),
46    Nucleotide("Nucleotide", NucleotideColourScheme.class),
47    NucleotideAmbiguity("Nucleotide Ambiguity",
48    NucleotideAmbiguityColourScheme.class),
49    PurinePyrimidine("Purine/Pyrimidine", PurinePyrimidineColourScheme.class),
50    RNAHelices("RNA Helices", RNAHelicesColour.class),
51    TCoffee("T-Coffee Scores", TCoffeeColourScheme.class),
52    IdColour("Sequence ID", IdColourScheme.class),
53    HMMERU("HMMER-Uniprot", HmmerGlobalBackground.class),
54    HMMERA("HMMER-Alignment", HmmerLocalBackground.class),
55    HMMMatchScore("HMM Match Score", HMMMatchScoreColourScheme.class);
56    // RNAInteraction("RNA Interaction type", RNAInteractionColourScheme.class)
57   
58    private String name;
59   
60    private Class<? extends ColourSchemeI> myClass;
61   
62    /**
63    * Constructor given the name of the colour scheme (as used in Jalview
64    * parameters). Note this is not necessarily the same as the 'display name'
65    * used in menu options (as this may be language-dependent).
66    *
67    * @param s
68    */
 
69  1242 toggle JalviewColourScheme(String s, Class<? extends ColourSchemeI> cl)
70    {
71  1242 name = s;
72  1242 myClass = cl;
73    }
74   
75    /**
76    * Returns the class of the colour scheme
77    *
78    * @return
79    */
 
80  1280 toggle public Class<? extends ColourSchemeI> getSchemeClass()
81    {
82  1280 return myClass;
83    }
84   
85    /**
86    * Returns the 'official' name of this colour scheme. This is the name that
87    * identifies the colour scheme as a start-up parameter for the Jalview
88    * application or applet. Note that it may not be the name shown in menu
89    * options, as these may be internationalised.
90    */
 
91  15107 toggle @Override
92    public String toString()
93    {
94  15107 return name;
95    }
96    }