JAL-1950 patch after merge
[jalview.git] / src / jalview / schemes / UserColourScheme.java
index d95652d..b86250a 100755 (executable)
@@ -73,7 +73,7 @@ public class UserColourScheme extends ResidueColourScheme
     schemeName = from.schemeName;
     if (from.lowerCaseColours != null)
     {
-      lowerCaseColours = new Color[lowerCaseColours.length];
+      lowerCaseColours = new Color[from.lowerCaseColours.length];
       System.arraycopy(from.lowerCaseColours, 0, lowerCaseColours, 0,
               from.lowerCaseColours.length);
     }
@@ -222,7 +222,8 @@ public class UserColourScheme extends ResidueColourScheme
             {
               lowerCaseColours = new Color[colors.length];
             }
-            lowerCaseColours[colIndex] = ColorUtils.parseColourString(colour);
+            lowerCaseColours[colIndex] = ColorUtils
+                    .parseColourString(colour);
           }
           else
           {
@@ -232,30 +233,12 @@ public class UserColourScheme extends ResidueColourScheme
       }
     } catch (Exception ex)
     {
-      System.out.println("Error parsing userDefinedColours:\n" + token
-              + "\n" + ex);
+      System.out.println(
+              "Error parsing userDefinedColours:\n" + token + "\n" + ex);
     }
 
   }
 
-  @Override
-  public Color findColour(char c, int j, SequenceI seq)
-  {
-    Color colour;
-    int index = ResidueProperties.aaIndex[c];
-
-    if (lowerCaseColours != null && 'a' <= c && c <= 'z')
-    {
-      colour = lowerCaseColours[index];
-    }
-    else
-    {
-      colour = colors[index];
-    }
-
-    return colour;
-  }
-
   public void setLowerCaseColours(Color[] lcolours)
   {
     lowerCaseColours = lcolours;
@@ -281,8 +264,8 @@ public class UserColourScheme extends ResidueColourScheme
   }
 
   /**
-   * Answers the customised name of the colour scheme, if it has one, else
-   * "User Defined"
+   * Answers the customised name of the colour scheme, if it has one, else "User
+   * Defined"
    */
   @Override
   public String getSchemeName()
@@ -291,7 +274,7 @@ public class UserColourScheme extends ResidueColourScheme
     {
       return schemeName;
     }
-    return "User Defined";
+    return ResidueColourScheme.USER_DEFINED;
   }
 
   /**