X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FColourSchemeProperty.java;h=425b3a1c964cf0e2fc6bb781cf910e0a7f13924f;hb=320c96aed11f5c396a9efd9ea83b0e35f05e21e4;hp=9b91066e191fded769148b291ae9d68a71993fa0;hpb=9390152fd31fd0d9c52833f1e5c63d222cb38d82;p=jalview.git
diff --git a/src/jalview/schemes/ColourSchemeProperty.java b/src/jalview/schemes/ColourSchemeProperty.java
index 9b91066..425b3a1 100755
--- a/src/jalview/schemes/ColourSchemeProperty.java
+++ b/src/jalview/schemes/ColourSchemeProperty.java
@@ -42,7 +42,7 @@ public class ColourSchemeProperty
/**
* Returns a colour scheme for the given name, with which the given data may
- * be coloured. The name may be one of
+ * be coloured. The name is not case-sensitive, and may be one of
*
* - Clustal
* - Blosum62
@@ -59,24 +59,27 @@ public class ColourSchemeProperty
* - T-Coffee Scores
* - RNA Helices
* - User Defined
- * - None
* - an AWT colour name e.g. red
* - residue colours list e.g. D,E=red;K,R,H=0022FF;c=yellow
*
* If none of these formats is matched, the string is converted to a colour
- * using a hashing algorithm.
+ * using a hashing algorithm. For name "None", returns null.
*
* @param forData
* @param name
* @return
*/
- public static ColourSchemeI getColour(AnnotatedCollectionI forData,
+ public static ColourSchemeI getColourScheme(AnnotatedCollectionI forData,
String name)
{
+ if (ResidueColourScheme.NONE.equalsIgnoreCase(name))
+ {
+ return null;
+
+ }
JalviewColourScheme scheme = JalviewColourScheme.forName(name);
if (scheme != null)
{
- // note JalviewColourScheme.None returns null here
return scheme.getColourScheme(forData);
}