X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FUserColourScheme.java;h=bf62e453b4b9e6eb8cdd9aaf6df20631a33b43ff;hb=0ca13d2d06bf5ee99eb7dc123ee7ffcea016f733;hp=256862dff87ea653318cbb75844cccf7a30b69c5;hpb=11b2e9b16c3bb93d8788c2bc5d5654f6163402e6;p=jalview.git diff --git a/src/jalview/schemes/UserColourScheme.java b/src/jalview/schemes/UserColourScheme.java index 256862d..bf62e45 100755 --- a/src/jalview/schemes/UserColourScheme.java +++ b/src/jalview/schemes/UserColourScheme.java @@ -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,8 +233,8 @@ 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); } } @@ -263,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() @@ -286,7 +287,7 @@ public class UserColourScheme extends ResidueColourScheme /* * step 1: build a map from colours to the symbol(s) that have the colour */ - Map> colours = new HashMap>(); + Map> colours = new HashMap<>(); for (char symbol = 'A'; symbol <= 'Z'; symbol++) { @@ -319,7 +320,7 @@ public class UserColourScheme extends ResidueColourScheme /* * step 2: make a list of { A,G,R=12f9d6 } residues/colour specs */ - List residueColours = new ArrayList(); + List residueColours = new ArrayList<>(); for (Entry> cols : colours.entrySet()) { boolean first = true; @@ -349,4 +350,10 @@ public class UserColourScheme extends ResidueColourScheme Collections.sort(residueColours); return StringUtils.listToDelimitedString(residueColours, ";"); } + + @Override + public boolean hasGapColour() + { + return (findColour(' ') != null); + } }