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);
}
{
lowerCaseColours = new Color[colors.length];
}
- lowerCaseColours[colIndex] = ColorUtils.parseColourString(colour);
+ lowerCaseColours[colIndex] = ColorUtils
+ .parseColourString(colour);
}
else
{
}
} 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;
}
/**
- * 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()
{
return schemeName;
}
- return "User Defined";
+ return ResidueColourScheme.USER_DEFINED;
}
/**